Skip to content

Commit

Permalink
improve check status 500
Browse files Browse the repository at this point in the history
  • Loading branch information
rrequero committed Mar 20, 2023
1 parent f84ce70 commit fdcfe53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gfw/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func (c *GFWClient) doRequest(req *http.Request) ([]byte, error) {
if res.StatusCode >= 500 {
if err != nil {
return nil, err
} else {
return nil, fmt.Errorf("Error %d: %s", res.StatusCode, string(body))
}
}
if res.StatusCode >= 300 && res.StatusCode < 500 {
Expand Down

0 comments on commit fdcfe53

Please sign in to comment.