Closed mastrzyz closed 4 years ago
I'm willing to help out with this issue, just want to confirm with folks we want to retry on ECONNRESET as well
Retrying this makes sense to me, I'd be happy to review :)
Don't know if it actually works, but the SO post talks about a way to trigger the econnreset client side for testing. https://stackoverflow.com/questions/22836424/simulate-an-econnreset-error-on-a-node-js-net-socket-instance
@damccorm What would be needed to get this in a released version, its been a long time for a release for this repo.
Environment
Node version: v12.14.1 Npm version: 6.13.4 OS and version: OSX Catalin typed-rest-client version: 1.7.3
Issue Description
The retry mechanism takes in account if we are able to send a request correctly and get a status code, but incase we get a "ECONNRESET" back from the code 'http' or 'https' node library we will reject the main promise and raise an exception
Expected behaviour
We retry ECONNRESET errors the same way we retry non successful status code errors
ie: