From a20c2bd5642639e0f71e8dd4e9dc9a3776106547 Mon Sep 17 00:00:00 2001 From: Adam Mospan Date: Thu, 30 May 2024 14:20:44 +0300 Subject: [PATCH] Add handle 429 error in default RetryConfig --- internal/http_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/http_client.go b/internal/http_client.go index 280aecc4..86faa37b 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -80,6 +80,7 @@ func WithDefaultRetryConfig(hc *http.Client) *HTTPClient { MaxRetries: 4, CheckForRetry: retryNetworkAndHTTPErrors( http.StatusServiceUnavailable, + http.StatusTooManyRequests, ), ExpBackoffFactor: 0.5, MaxDelay: &twoMinutes,