node-http2
node-http2 copied to clipboard
Forward endpoint errors to httpsRequest
Needed to be able to handles thoose errors gracefully because endpoint is not exposed.
Hrm, so for these, I think I would rather see some logging happen, as well, similar to how we do other errors that we forward on through other objects:
var self = this;
whatever.on('error', function (error) {
self._log.error('Whatever error: ' + e.toString());
forwardObject.emit('error', error);
}
Where whatever is the object you're catching errors from, and forwardObject is whatever you're calling emit on in your forwarder (sometimes self, sometimes httpsRequest in your patch).
That way we have symmetry in how we handle errors.
@nwgh Ok, I just comitted the fix
just a friendly bump :)