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
* The custom function that is used to calculate the actual delay based on the the timer & the number of attemps.
23
+
*
24
+
* _Default: `delay * nbOfAttemps`_
25
+
*/
16
26
delayRamp?: DelayRampFunction,
27
+
/**
28
+
* The maximum number of retries before resolving the promise with the last error. Specifying 0 means infinite retries.
29
+
*
30
+
* _Default: `10`_
31
+
*/
17
32
maxAttempts?: number,
33
+
/**
34
+
* The request will be retried until that condition is satisfied.
35
+
*
36
+
* _Default: `response && response.ok`_
37
+
*/
18
38
until?: UntilFunction,
39
+
/**
40
+
* Callback that will get executed before retrying the request. If this function returns an object having url and/or options properties, they will override existing values in the retried request.
41
+
*
42
+
* _Default: `undefined`_
43
+
*/
19
44
onRetry?: OnRetryFunction,
45
+
/**
46
+
* If true, will retry the request if a network error was thrown. Will also provide an 'error' argument to the `onRetry` and `until` methods.
47
+
*
48
+
* _Default: `false`_
49
+
*/
20
50
retryOnNetworkError?: boolean,
51
+
/**
52
+
* If true, the request will be resolved with the latest response instead of rejected with an error.
53
+
*
54
+
* _Default: `false`_
55
+
*/
56
+
resolveWithLatestReponse?: boolean
21
57
}
22
58
23
59
/**
24
60
* ## Retry middleware
25
61
*
26
62
* #### Retries a request multiple times in case of an error (or until a custom condition is true).
* > Callback that will get executed before retrying the request. If this function returns an object having url and/or options properties, they will override existing values in the retried request.
57
-
*
58
-
* > *(default: null)*
59
-
*
60
-
* - *retryOnNetworkError* `boolean`
61
-
*
62
-
* > If true, will retry the request if a network error was thrown. Will also provide an 'error' argument to the `onRetry` and `until` methods.
0 commit comments