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
@@ -83,6 +83,13 @@ const result = await pRetry(run, {
83
83
console.log(result);
84
84
```
85
85
86
+
The `context` object contains:
87
+
-`error` - The error that was thrown
88
+
-`attemptNumber` - The attempt number (starts at 1)
89
+
-`retriesLeft` - Number of retries remaining
90
+
-`retriesConsumed` - Number of retries consumed so far
91
+
-`retryDelay` - The delay in milliseconds before the next retry (based on `minTimeout`, `factor`, `maxTimeout`, and `randomize`)
92
+
86
93
The `onFailedAttempt` function can return a promise. For example, to add a [delay](https://github.com/sindresorhus/delay):
0 commit comments