()
| 253 | retryOptions?: RetryOptions |
| 254 | ): ShouldRetryResult { |
| 255 | function shouldRetryForOptions(): ShouldRetryResult { |
| 256 | const retry = { ...defaultRetryOptions, ...retryOptions }; |
| 257 | |
| 258 | const delay = calculateNextRetryDelay(retry, attempt); |
| 259 | |
| 260 | if (delay) { |
| 261 | return { retry: true, delay }; |
| 262 | } else { |
| 263 | return { retry: false }; |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | // Note this is not a standard header. |
| 268 | const shouldRetryHeader = response.headers.get("x-should-retry"); |
no test coverage detected
searching dependent graphs…