From ec7c983e46f24850abd5f37dbdaedb06d52ef534 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:18:32 +0100 Subject: [PATCH] [bugfix] retry on http 500 errors *inclusive* (#2886) --- internal/httpclient/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go index ed0949c9c..74c931ea9 100644 --- a/internal/httpclient/client.go +++ b/internal/httpclient/client.go @@ -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)