async-retry icon indicating copy to clipboard operation
async-retry copied to clipboard

The documentation for onRetry is wrong

Open BenJackGill opened this issue 3 years ago • 1 comments

The documentation currently says this:

onRetry: an optional Function that is invoked after a new retry is performed. It's passed the Error that triggered it as a parameter.

But it should say this:

onRetry: an optional Function that is invoked before a new retry is performed. It's passed the Error that triggered it as a parameter.

It's a small but significant difference.

I thought onRetry was useless because the docs say it runs after the retry. Then I tested and found it actually runs before the retry, which is much more useful. The docs should reflect that.

BenJackGill avatar May 25 '22 23:05 BenJackGill

is it possible to "stop" the retry based on some condition?

EG only retry is status code == 501

ChuckJonas avatar Sep 21 '23 19:09 ChuckJonas