From f13bf11348eaecbbec3f84938d75bd19b0e482f1 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 6 Mar 2025 10:14:16 +0000 Subject: [PATCH] Add context to agent token validation error Signed-off-by: Brad Davidson (cherry picked from commit c11c06cad4b09850b42cd597fb9257f903f5db3c) Signed-off-by: Brad Davidson --- pkg/agent/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/agent/run.go b/pkg/agent/run.go index c2fb728080..9623e7df79 100644 --- a/pkg/agent/run.go +++ b/pkg/agent/run.go @@ -351,7 +351,7 @@ func createProxyAndValidateToken(ctx context.Context, cfg *cmds.Agent) (proxy.Pr for { newToken, err := clientaccess.ParseAndValidateToken(proxy.SupervisorURL(), cfg.Token, options...) if err != nil { - logrus.Error(err) + logrus.Errorf("Failed to validate connection to cluster at %s: %v", cfg.ServerURL, err) select { case <-ctx.Done(): return nil, ctx.Err()