Skip to content

Commit

Permalink
docs: document cause argument to onRetry (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmpage authored Oct 4, 2022
1 parent 2aeaae5 commit d63de44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,14 @@ fetch('http://one-more.site.com', {

#### <a name="opts-onretry"></a> `> opts.onRetry`

A function called whenever a retry is attempted.
A function called with the response or error which caused the retry whenever one is attempted.

##### Example

```javascript
fetch('https://flaky.site.com', {
onRetry() {
console.log('we will retry!')
onRetry(cause) {
console.log('we will retry because of', cause)
}
})
```
Expand Down

0 comments on commit d63de44

Please sign in to comment.