Skip to content

Commit

Permalink
fix: status code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Nov 21, 2024
1 parent 6dea0d3 commit 218383f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/dns/rainyun/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (c *Client) do(req *http.Request, result any) error {

defer func() { _ = resp.Body.Close() }()

if resp.StatusCode > http.StatusBadRequest {
if resp.StatusCode/100 != 2 {
return parseError(req, resp)
}

Expand Down

0 comments on commit 218383f

Please sign in to comment.