client-request
client-request copied to clipboard
timeouts do not propagate ECONNRESET
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.
Thank you for the report @Fishrock123! Could you elaborate a bit more on what you're seeing and perhaps what you'd prefer?
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')