From cf2cf0d479ba986193da78163543b16de6eb8b5a Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Mon, 7 Apr 2025 16:07:35 +0000 Subject: [PATCH] fix: log correct error variable in createTailnet After noticing #17265, I asked Claude Code if it could find similar bugs. It identified this one, which appears to be a valid bug. --- agent/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/agent.go b/agent/agent.go index 3c6a3c19610e3..cf784a2702bfe 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1408,7 +1408,7 @@ func (a *agent) createTailnet( if rPTYServeErr != nil && a.gracefulCtx.Err() == nil && !strings.Contains(rPTYServeErr.Error(), "use of closed network connection") { - a.logger.Error(ctx, "error serving reconnecting PTY", slog.Error(err)) + a.logger.Error(ctx, "error serving reconnecting PTY", slog.Error(rPTYServeErr)) } }); err != nil { return nil, err