[bugfix] retry on http 500 errors *inclusive* (#2886)

This commit is contained in:
kim 2024-04-30 15:18:32 +01:00 committed by GitHub
parent ec334ece20
commit ec7c983e46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -339,7 +339,7 @@ func (c *Client) do(r *Request) (rsp *http.Response, retry bool, err error) {
// A retryable error.
return nil, true, err
} else if rsp.StatusCode > 500 ||
} else if rsp.StatusCode >= 500 ||
rsp.StatusCode == http.StatusTooManyRequests {
// Codes over 500 (and 429: too many requests)