(error: unknown)
| 194 | } |
| 195 | |
| 196 | function isRetryable(error: unknown): boolean { |
| 197 | if (error instanceof UploadPartHttpError) { |
| 198 | return error.status >= 500 || error.status === 408 || error.status === 429; |
| 199 | } |
| 200 | // Network errors and timeouts are retryable. |
| 201 | return true; |
| 202 | } |
| 203 | |
| 204 | function sleep(ms: number): Promise<void> { |
| 205 | return new Promise((resolve) => { |
no outgoing calls
no test coverage detected