Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit b06cab1

Browse files
committed
error now includes response body string
1 parent f37f8e5 commit b06cab1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (c *Client) request(method, requestPath string, query url.Values, body io.R
6565
}
6666

6767
if resp.StatusCode >= 400 {
68-
return fmt.Errorf("status: %d, body: %v", resp.StatusCode, bodyContents)
68+
return fmt.Errorf("status: %d, body: %v", resp.StatusCode, string(bodyContents))
6969
}
7070

7171
if responseStruct == nil {

0 commit comments

Comments
 (0)