Skip to content

Commit d63de44

Browse files
authoredOct 4, 2022
docs: document cause argument to onRetry (#173)
1 parent 2aeaae5 commit d63de44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ fetch('http://one-more.site.com', {
321321

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

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

326326
##### Example
327327

328328
```javascript
329329
fetch('https://flaky.site.com', {
330-
onRetry() {
331-
console.log('we will retry!')
330+
onRetry(cause) {
331+
console.log('we will retry because of', cause)
332332
}
333333
})
334334
```

0 commit comments

Comments
 (0)
Please sign in to comment.