You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@ All the retry options are configurable and can be set in `retryOptions` in the `
58
58
|`retryMaxDuration`| Number | time in milliseconds to retry until throwing an error |`NODE_FETCH_RETRY_MAX_RETRY`| 60000 ms |
59
59
|`retryInitialDelay`| Number | time in milliseconds to wait between retries |`NODE_FETCH_RETRY_INITIAL_WAIT`| 100 ms |
60
60
|`retryBackoff`| Number | backoff factor for wait time between retries |`NODE_FETCH_RETRY_BACKOFF`| 2.0 |
61
-
|`retryOnHttpResponse`| Function | a *function* determining whether to retry given the HTTP response | none | retry on all 5xx errors|
62
-
|`retryOnHttpError`| Function | a *function* determining whether to retry given the HTTP error exception thrown | none | retry on all `FetchError`'s of type `system`|
61
+
|`retryOnHttpResponse`| Function | a *function* determining whether to retry given the HTTP response. Can be asynchronous| none | retry on all 5xx errors|
62
+
|`retryOnHttpError`| Function | a *function* determining whether to retry given the HTTP error exception thrown. Can be asynchronous| none | retry on all `FetchError`'s of type `system`|
63
63
|`socketTimeout`| Number | time until socket timeout in milliseconds. _Note: if `socketTimeout` is >= `retryMaxDuration`, it will automatically adjust the socket timeout to be exactly half of the `retryMaxDuration`. To disable this feature, see `forceSocketTimeout` below_|`NODE_FETCH_RETRY_SOCKET_TIMEOUT`| 30000 ms |
64
64
|`forceSocketTimeout`| Boolean | If true, socket timeout will be forced to use `socketTimeout` property declared regardless of the `retryMaxDuration`. _Note: this feature was designed to help with unit testing and is not intended to be used in practice_|`NODE_FETCH_RETRY_FORCE_TIMEOUT`| false |
65
65
@@ -166,7 +166,7 @@ Disabling retry behavior will not prevent the usage of other options set on the
166
166
167
167
### Additional notes on retry duration
168
168
169
-
If the fetch is unsucessful, the retry logic determines how long it will wait before the next attempt. If the time remaining will exceed the total time allowed by retryMaxDuration then another attempt will not be made. There are examples of how this works in the testing code.
169
+
If the fetch is unsuccessful, the retry logic determines how long it will wait before the next attempt. If the time remaining will exceed the total time allowed by retryMaxDuration then another attempt will not be made. There are examples of how this works in the testing code.
0 commit comments