Skip to content

Commit 68b154e

Browse files
committed
Remove commented out code for retrying requests
1 parent fb2cf1d commit 68b154e

File tree

2 files changed

+1
-441
lines changed

2 files changed

+1
-441
lines changed

httpclient/httpclient_request.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,7 @@ func (c *Client) executeRequestWithRetries(method, endpoint string, body, out in
170170
log.Warn("Non-retryable error received", zap.Int("status_code", resp.StatusCode), zap.String("status_message", statusMessage))
171171
return resp, errors.HandleAPIError(resp, log)
172172
}
173-
/*
174-
// Check for retryable errors
175-
if errors.IsRateLimitError(resp) || errors.IsTransientError(resp) {
176-
retryCount++
177-
if retryCount > c.clientConfig.ClientOptions.MaxRetryAttempts {
178-
log.Warn("Max retry attempts reached", zap.String("method", method), zap.String("endpoint", endpoint))
179-
break
180-
}
181-
waitDuration := calculateBackoff(retryCount)
182-
log.Warn("Retrying request due to error", zap.String("method", method), zap.String("endpoint", endpoint), zap.Int("retryCount", retryCount), zap.Duration("waitDuration", waitDuration), zap.Error(err), zap.String("status_message", statusMessage))
183-
time.Sleep(waitDuration)
184-
continue
185-
}
186-
*/
173+
187174
// Parsing rate limit headers if a rate-limit error is detected
188175
if errors.IsRateLimitError(resp) {
189176
waitDuration := parseRateLimitHeaders(resp, log)

0 commit comments

Comments
 (0)