Skip to content

Commit

Permalink
Merge pull request #2 from GlobalFishingWatch/improve_check_errors
Browse files Browse the repository at this point in the history
improve check status 500
  • Loading branch information
rrequero authored Mar 20, 2023
2 parents f84ce70 + fdcfe53 commit 427db06
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 427db06

Please sign in to comment.