Skip to content

Commit

Permalink
status code changed
Browse files Browse the repository at this point in the history
  • Loading branch information
KshitijaKakde committed May 31, 2024
1 parent f88395d commit 0ac64c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ func (c *Client) GetVersion() (string, error) {
if err != nil {
return "", err
}
case resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusUnauthorized:
case !(resp.StatusCode >= http.StatusOK && resp.StatusCode < http.StatusMultipleChoices) && resp.StatusCode != http.StatusUnauthorized:

return "", c.api.ParseJSONError(resp)
}
version, err := extractString(resp)
Expand Down

0 comments on commit 0ac64c3

Please sign in to comment.