Skip to content

Commit

Permalink
Merge pull request nutanix#134 from terraform-providers/fix-#112
Browse files Browse the repository at this point in the history
fix nutanix#112: Improve error handling on incorrect API calls
  • Loading branch information
PacoDw authored Jun 19, 2020
2 parents 06dd833 + 26ad251 commit 6838fbe
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 @@ -232,7 +232,7 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) error

// CheckResponse checks errors if exist errors in request
func CheckResponse(r *http.Response) error {
if c := r.StatusCode; c >= 200 && c <= 299 && r.Request.Method == http.MethodDelete {
if c := r.StatusCode; c >= 200 && c <= 299 {
return nil
}

Expand Down

0 comments on commit 6838fbe

Please sign in to comment.