From 1f8eea53a873030bc19a8d8e57f2e4014160c01c Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 3 Oct 2024 08:30:27 -0700 Subject: [PATCH] control/controlclient: include HTTP status string in error message too Not just its code. Updates tailscale/corp#23584 Change-Id: I8001a675372fe15da797adde22f04488d8683448 Signed-off-by: Brad Fitzpatrick --- control/controlclient/direct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 52bc01652..9cbd0e14e 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -1229,7 +1229,7 @@ func loadServerPubKeys(ctx context.Context, httpc *http.Client, serverURL string return nil, fmt.Errorf("fetch control key response: %v", err) } if res.StatusCode != 200 { - return nil, fmt.Errorf("fetch control key: %d", res.StatusCode) + return nil, fmt.Errorf("fetch control key: %v", res.Status) } var out tailcfg.OverTLSPublicKeyResponse jsonErr := json.Unmarshal(b, &out)