Skip to content

Commit

Permalink
fix(extension): consider requests failed when status code is not 2xx (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarakal authored and mpuigdomenchSage committed Jan 28, 2025
1 parent 172aa0e commit b53e65c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/internal/extensionapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (e *Client) doRequest(req *http.Request, out interface{}) (*http.Response,
if err != nil {
return nil, err
}
if resp.StatusCode != 200 {
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return nil, fmt.Errorf("request failed with status %s", resp.Status)
}
defer resp.Body.Close()
Expand Down

0 comments on commit b53e65c

Please sign in to comment.