Skip to content

Commit

Permalink
Enable printing of error
Browse files Browse the repository at this point in the history
  • Loading branch information
gfenn-newbury committed Dec 21, 2021
1 parent 372199e commit 2588a1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (c *Client) sendRequest(req *http.Request, v interface{}) error {
if res.StatusCode < http.StatusOK || res.StatusCode >= http.StatusBadRequest {
var errRes errorResponse
if err = json.NewDecoder(res.Body).Decode(&errRes); err == nil {
fmt.Printf(errRes.Detail)
return errors.New(errRes.Detail)
}

Expand Down

0 comments on commit 2588a1a

Please sign in to comment.