Skip to content

Commit 9ef6a73

Browse files
Clarify shouldRetry documentation (#93)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent e05b101 commit 9ef6a73

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export type Options = {
7171
/**
7272
Decide if a retry should occur based on the context. Returning true triggers a retry, false aborts with the error.
7373
74+
It is only called if `retries` and `maxRetryTime` have not been exhuasted.
75+
7476
It is not called for `TypeError` (except network errors) and `AbortError`.
7577
7678
@example

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ Type: `Function`
103103

104104
Decide if a retry should occur based on the context. Returning true triggers a retry, false aborts with the error.
105105

106+
It is only called if `retries` and `maxRetryTime` have not been exhuasted.
107+
106108
It is not called for `TypeError` (except network errors) and `AbortError`.
107109

108110
```js

0 commit comments

Comments
 (0)