Skip to content

Commit

Permalink
Merge pull request nutanix#270 from yannickstruyf3/bugfix/unmarshal-e…
Browse files Browse the repository at this point in the history
…rror-message

modified unmarshal error to also return response body
  • Loading branch information
marinsalinas authored May 20, 2021
2 parents 5c03166 + a2fde10 commit 0a8f11f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func CheckResponse(r *http.Response) error {
var res map[string]interface{}
err = json.Unmarshal(buf, &res)
if err != nil {
return fmt.Errorf("unmarshalling error response %s", err)
return fmt.Errorf("unmarshalling error response %s for response body %s", err, string(buf))
}
log.Print("[DEBUG] after json.Unmarshal")

Expand Down

0 comments on commit 0a8f11f

Please sign in to comment.