-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mirror superagent behaviour in call back for creating errors #14
Mirror superagent behaviour in call back for creating errors #14
Conversation
@luispabon any chance to get this merged? Thanks |
Thank you Mike. This significantly changes the error handling interface, I'd need to issue a new major version to ensure semver is respected. Could you please let me know which version of superagent you at? |
We were on 3.6.0 and I also tried it on 8.1.2 they both appear to have the same error synthesizing behaviour on nonOk responses. |
@luispabon yep no problem added tests for the new error synthesizing cases. And yah I think a new major version makes sense. Although it's bringing the behaviour inline with the core superagent it is a major change from this plugin's point of view. |
@luispabon sorry to be a pain, just wondering if you have a rough idea of when you would have time to get this in? Thanks |
https://github.com/luispabon/superagent-retry-delay/actions/runs/6733950566 <-- published 3.0.0 |
You rock thanks so much! |
No, thanks for your contribution 👍🏽 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14 +/- ##
==========================================
+ Coverage 84.90% 91.17% +6.27%
==========================================
Files 1 1
Lines 53 68 +15
==========================================
+ Hits 45 62 +17
+ Misses 8 6 -2 ☔ View full report in Codecov by Sentry. |
In our use of this delay module we noticed a difference in our end callback behaviour when just including the retry-delay. This is porting https://github.com/ladjs/superagent/blob/master/src/node/index.js#L893-L908 this section of the core superagent callback into the retry-delay callback to create errors on a non-ok response. to mirror the core superagent behaviour