fix: address code review findings
This commit is contained in:
1 parent
c2bdffb0ab
commit
c3bc719878
5 files changed
+79
-187
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user