From 8543d7403e60ddc66787033866681ca43ce3002d Mon Sep 17 00:00:00 2001 From: TimHuynh Date: Tue, 31 Oct 2023 14:53:59 -0500 Subject: [PATCH] add logging --- cmd/vela-worker/register.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/vela-worker/register.go b/cmd/vela-worker/register.go index 7460e84a..ae07a369 100644 --- a/cmd/vela-worker/register.go +++ b/cmd/vela-worker/register.go @@ -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) + } } }