Skip to content

Commit

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

fixed wrong status_code check in client (404 should be 401)
  • Loading branch information
coderGo93 authored Nov 25, 2020
2 parents 33912db + d2c370b commit 52227a7
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 52227a7

Please sign in to comment.