Skip to content

Commit

Permalink
Fix usage example in the readme (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshikNesin authored and sindresorhus committed Jan 14, 2019
1 parent a9b5fc1 commit 6ef29e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const run = async () => {
(async () => {
const result = await pRetry(run, {
onFailedAttempt: error => {
console.log(`Attempt ${error.attemptNumber} failed. There are ${error.attemptsLeft} attempts left.`);
console.log(`Attempt ${error.attemptNumber} failed. There are ${error.retriesLeft} retries left.`);
// 1st request => Attempt 1 failed. There are 4 retries left.
// 2nd request => Attempt 2 failed. There are 3 retries left.
//
Expand Down Expand Up @@ -87,7 +87,7 @@ Options are passed to the [`retry`](https://github.com/tim-kos/node-retry#retryo

Type: `Function`

Callback invoked on each retry. Receives the error thrown by `input` as the first argument with properties `attemptNumber` and `attemptsLeft` which indicate the current attempt number and the number of attempts left, respectively.
Callback invoked on each retry. Receives the error thrown by `input` as the first argument with properties `attemptNumber` and `retriesLeft` which indicate the current attempt number and the number of attempts left, respectively.

### pRetry.AbortError(message|error)

Expand Down

0 comments on commit 6ef29e7

Please sign in to comment.