fix: address code review findings

This commit is contained in:
2026-08-19 14:02:08 +03:00
parent c2bdffb0ab
commit c3bc719878
5 changed files with 79 additions and 187 deletions

View File

@@ -277,10 +277,10 @@ func isRetryableError(err error) bool {
if err == nil {
return false
}
// Check for HTTP status codes that are retryable (5xx errors)
// Check for HTTP status codes that are retryable (5xx errors and 429)
apiErr, ok := err.(*APIError)
if ok {
return apiErr.Code >= 500 && apiErr.Code < 600
return (apiErr.Code >= 500 && apiErr.Code < 600) || apiErr.Code == 429
}
// Check for network errors
errStr := err.Error()