Skip to content
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

Unhandled error in stream #27065

Closed
armoreal opened this issue Apr 3, 2019 · 2 comments
Closed

Unhandled error in stream #27065

armoreal opened this issue Apr 3, 2019 · 2 comments
Labels
question Issues that look for answers.

Comments

@armoreal
Copy link

armoreal commented Apr 3, 2019

Very rare error, like 1 in 100k http requests. Using try {} catch {}, but it doesn't help. The whole script is crushing on this one:

`
events.js:170
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:167:27)
Emitted 'error' event at:
at Socket.socketErrorListener (_http_client.js:397:9)
at Socket.emit (events.js:193:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
`

@mscdex
Copy link
Contributor

mscdex commented Apr 3, 2019

You have to attach an 'error' event handler on your request and/or response object.

@BridgeAR
Copy link
Member

I am closing this as question. Please leave a message if you would like this to be reopened.

@BridgeAR BridgeAR added the question Issues that look for answers. label Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

3 participants