ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.59k stars 1.33k forks source link

fix: ensure node retries happen when using .then syntax (#1487) #1543

Closed charlenetshos closed 4 years ago

charlenetshos commented 4 years ago

This PR is to enforce consistent retry behaviour for both the.end and .then syntaxes.

The problem I'm trying to fix has been highlighted in these issues:

When using .then syntax in Node.js, we only want to abort a request if there are no retries or the maximum number of retries has been exceeded.

Please review

charlenetshos commented 4 years ago

Hello @niftylettuce! We're quite keen to see this fixed as we're having a number of socket timeout errors. I'm wondering when you'll have an opportunity to review this PR. Is there something I can do to make it happen? Thank you

niftylettuce commented 4 years ago

v5.3.0 published to npm and GitHub releases page with changelog

charlenetshos commented 4 years ago

@niftylettuce thank you for releasing this!

niftylettuce commented 4 years ago

no prob

niftylettuce commented 4 years ago

~Just so you're aware, I had to revert this because the tests failed.~

niftylettuce commented 4 years ago

Oh sorry, I commented on the wrong issue. Ignore this.

niftylettuce commented 4 years ago

For reference, or if you want to help debug, see https://github.com/visionmedia/superagent/pull/1527.