Skip to content

Commit

Permalink
fix(error handler): add default handler to econnreset
Browse files Browse the repository at this point in the history
  • Loading branch information
chimurai committed Apr 19, 2022
1 parent 4baae76 commit bd15913
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export function init(proxy: httpProxy, option: Options): void {
proxy.on(eventName, handlers[eventName]);
}

proxy.on('econnreset', (err, req, res, target) => {
logger.error(`[HPM] ECONNRESET: %s`, err);
});

logger.debug('[HPM] Subscribed to http-proxy events:', Object.keys(handlers));
}

Expand Down

0 comments on commit bd15913

Please sign in to comment.