Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHuynh committed Oct 31, 2023
1 parent c647789 commit 8543d74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/vela-worker/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,10 @@ func (w *Worker) updateWorkerStatus(config *library.Worker, status string) {
logrus.Errorf("status code: %v, unable to update worker %s status with the server: %v",
resp.StatusCode, config.GetHostname(), logErr)
}
if resp == nil {
// log the error instead of returning so the operation doesn't block worker deployment
logrus.Errorf("worker status update response is nil, unable to update worker %s status with the server: %v",
config.GetHostname(), logErr)
}
}
}

0 comments on commit 8543d74

Please sign in to comment.