Skip to content

Commit

Permalink
Merge pull request nutanix#200 from yannickstruyf3/bugfix/wrong-http-…
Browse files Browse the repository at this point in the history
…code-check-client

fixed wrong status_code check in client (404 should be 401)
  • Loading branch information
coderGo93 authored Nov 25, 2020
2 parents b3e6652 + 7cf75dd commit fa78e39
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 @@ -238,7 +238,7 @@ func CheckResponse(r *http.Response) error {

// Nutanix returns non-json response with code 401 when
// invalid credentials are used
if c == http.StatusNotFound {
if c == http.StatusUnauthorized {
return fmt.Errorf("invalid Nutanix Credentials")
}

Expand Down

0 comments on commit fa78e39

Please sign in to comment.