Skip to content

req.emit is not a function #8431

Closed
Closed
@carbonrobot

Description

@carbonrobot
  • Version: 6.4.0
  • Platform: Windows 64bit
  • Subsystem: _http_client.js

req.emit('close');

When an HTTP request fails with an error, req.emit is not a function. I can reproduce in our application, but having difficulty creating a minimum sample. This is a call against an HTTPS endpoint that is returning a 500 error.

TypeError: req.emit is not a function
at TLSSocket.socketCloseListener (_http_client.js:271:7)
at emitOne (events.js:101:20)
at TLSSocket.emit (events.js:188:7)
at TCP._handle.close as _onclose

node-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpsIssues or PRs related to the https subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions