Skip to content

Commit

Permalink
fix: err shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3rw3rk committed Apr 19, 2023
1 parent d22f751 commit 3ce1c68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/vela-worker/operate.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ func (w *Worker) operate(ctx context.Context) error {
// check in failed
if err != nil {
// check if token is expired
expired, err := w.VelaClient.Authentication.IsTokenAuthExpired()
if err != nil {
expired, expiredErr := w.VelaClient.Authentication.IsTokenAuthExpired()
if expiredErr != nil {
logrus.Error("unable to check token expiration")
return err
return expiredErr
}

// token has expired
Expand Down

0 comments on commit 3ce1c68

Please sign in to comment.