Skip to content

Unhandled error in stream #27065

Description

@armoreal

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)
`

Activity

  1. mscdex commented on Apr 3, 2019

    @mscdex
    Contributor

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

  2. BridgeAR commented on Apr 10, 2019

    @BridgeAR
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions