- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.6k
Closed
Labels
http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.
Description
After thinking about this for a while I think we still should forward error events from the stream object. However, only if there is an event listener as to avoid uncaught errors.
function onStreamError(error) {
  const request = this[kRequest];
  if (request.hasListener('error')) {
    request.emit('error', error);
  }
}Otherwise we end up with hacks like this:
 const incoming = req.stream || req
 incoming.on('error', errorHandler)Metadata
Metadata
Assignees
Labels
http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.