Skip to content

Commit

Permalink
control/controlclient: include HTTP status string in error message too
Browse files Browse the repository at this point in the history
Not just its code.

Updates tailscale/corp#23584

Change-Id: I8001a675372fe15da797adde22f04488d8683448
Signed-off-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
bradfitz committed Oct 3, 2024
1 parent 6f694da commit 1f8eea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control/controlclient/direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1f8eea5

Please sign in to comment.