Skip to content

Commit

Permalink
dataclients/kubernetes: add resource URI to error message (#3268)
Browse files Browse the repository at this point in the history
This is helpful for debugging k8s permissions.

Signed-off-by: Alexander Yastrebov <[email protected]>
  • Loading branch information
AlexanderYastrebov authored Oct 11, 2024
1 parent 3d9c020 commit 385d179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataclients/kubernetes/clusterclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (c *clusterClient) getJSON(uri string, a interface{}) error {

if rsp.StatusCode != http.StatusOK {
log.Tracef("request failed, status: %d, %s", rsp.StatusCode, rsp.Status)
return fmt.Errorf("request failed, status: %d, %s", rsp.StatusCode, rsp.Status)
return fmt.Errorf("request to %s failed, status: %d, %s", uri, rsp.StatusCode, rsp.Status)
}

b := bytes.NewBuffer(nil)
Expand Down

0 comments on commit 385d179

Please sign in to comment.