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

Still allow providing a callback #10

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

repl-mike-roest
Copy link
Contributor

@luispabon just adding the ability here to still provide a callback while allowing for delays.

Our use case here is we need to inspect the response body to make the determination about whether to retry or not we can't just rely on the response code. With vanilla superagent we can do this but then it just fires all the retries as fast as possible. With this change we will be able to use the delaying functionality of superagent-retry-delay while not losing the ability to deep dive into response/error to make the retry decision.

@repl-mike-roest repl-mike-roest changed the title Still allow providing a callback to get dela Still allow providing a callback Oct 10, 2023
@luispabon
Copy link
Owner

Great contribution, thank you very much.

@luispabon luispabon merged commit bbcaf8c into luispabon:master Oct 11, 2023
6 checks passed
@luispabon
Copy link
Owner

@repl-mike-roest your changes have gone out now as 2.8.0

@repl-mike-roest repl-mike-roest deleted the allow-callback branch October 11, 2023 13:25
@repl-mike-roest
Copy link
Contributor Author

Awesome @luispabon thanks so much!

@repl-mike-roest
Copy link
Contributor Author

I just realized my example in the readme is wrong. I'll have a new PR in a couple of minutes to fix it

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

Successfully merging this pull request may close these issues.

2 participants