Skip to content

Commit c1dc47c

Browse files
authored
fix(client): magic number (#944)
Use the net std library instead of the 200 and 400 number.
1 parent 25716da commit c1dc47c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func (c *Client) do(method, path string, doOptions doOptions) (*http.Response, e
485485

486486
return nil, chooseError(ctx, err)
487487
}
488-
if resp.StatusCode < 200 || resp.StatusCode >= 400 {
488+
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest {
489489
return nil, newError(resp)
490490
}
491491
return resp, nil

0 commit comments

Comments
 (0)