Skip to content

Commit

Permalink
in Do() return response even if Unmarshaler fails
Browse files Browse the repository at this point in the history
  • Loading branch information
marcsauter committed Mar 22, 2018
1 parent 1ece438 commit 998da1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*htt
}

if err = c.Unmarshaler(resp.Body, v, c.ContentType); err != nil {
return nil, err
return resp, err
}

return resp, err
Expand Down

0 comments on commit 998da1d

Please sign in to comment.