Skip to content

Commit

Permalink
Remove check for 200 in client request
Browse files Browse the repository at this point in the history
It does not make sense to do that here, otherwise we would need to check for all 2xx statuses because they are all valid. This is responsibility of the client using the library.
  • Loading branch information
williancarminato authored Oct 2, 2017
1 parent 6a7538e commit 392332b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ranger_http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ func (client *apiClient) Do(req *http.Request) (*http.Response, error) {
"ApiClient.Do=Cannot execute request, URL=%s, Header=%+v", req.URL, req.Header,
)
}
if res.StatusCode != http.StatusOK {
return nil, fmt.Errorf(
"ApiClient.Do=Bad request,StatusCode=%d, URL=%s, Header: %+v", res.StatusCode, req.URL, res.Header,
)
}

return res, err
}
Expand Down

0 comments on commit 392332b

Please sign in to comment.