client-request icon indicating copy to clipboard operation
client-request copied to clipboard

timeouts do not propagate ECONNRESET

Open Fishrock123 opened this issue 6 years ago • 2 comments

All the timeout handing logic is overridden with custom errors, making it unwieldy to catch 408 / client timeouts for retries since the ECONNRESET code is not propagated.

Fishrock123 avatar Feb 26 '19 23:02 Fishrock123

Thank you for the report @Fishrock123! Could you elaborate a bit more on what you're seeing and perhaps what you'd prefer?

brycebaril avatar Feb 27 '19 22:02 brycebaril

Ideally there would be a .statusCode attached to the error which would be 408.

Or really, any property so that this is not necessary:

typeof err.message === 'string' &&
          err.message.toLowerCase().includes('timeout')

Fishrock123 avatar Apr 18 '19 19:04 Fishrock123