Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The documentation for onRetry is wrong #92

Open
BenJackGill opened this issue May 25, 2022 · 1 comment
Open

The documentation for onRetry is wrong #92

BenJackGill opened this issue May 25, 2022 · 1 comment

Comments

@BenJackGill
Copy link

BenJackGill commented May 25, 2022

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.

@ChuckJonas
Copy link

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

EG only retry is status code == 501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants