Skip to content

Commit bd15913

Browse files
committed
fix(error handler): add default handler to econnreset
1 parent 4baae76 commit bd15913

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/_handlers.ts

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export function init(proxy: httpProxy, option: Options): void {
1111
proxy.on(eventName, handlers[eventName]);
1212
}
1313

14+
proxy.on('econnreset', (err, req, res, target) => {
15+
logger.error(`[HPM] ECONNRESET: %s`, err);
16+
});
17+
1418
logger.debug('[HPM] Subscribed to http-proxy events:', Object.keys(handlers));
1519
}
1620

0 commit comments

Comments
 (0)