* Checks if the HTTP status code is retryable
(status: number)
| 48 | * Checks if the HTTP status code is retryable |
| 49 | */ |
| 50 | function isRetryableHttpStatus(status: number): boolean { |
| 51 | // 429 (Too Many Requests), 502 (Bad Gateway), 503 (Service Unavailable), 504 (Gateway Timeout) |
| 52 | return status === 429 || status === 502 || status === 503 || status === 504; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Checks if the error type indicates a server issue |