File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,18 @@ class Graceful {
9797 } ) ;
9898
9999 // handle uncaught exceptions
100- process . on ( 'uncaughtExceptionMonitor' , ( err , origin ) => {
100+ // NOTE: this was commented out since we monitor `uncaughtException` instead
101+ // process.on('uncaughtExceptionMonitor', (err, origin) => {
102+ // console.error(err, { origin });
103+ // this.config.logger.fatal(err, { origin });
104+ // });
105+
106+ //
107+ // NOTE: due to undici having core issues across various node versions
108+ // we unfortunately have to listen for it specifically here
109+ // (e.g. `ConnectTimeoutError` causes an uncaught exception even with a custom dispatcher and using `undici.request` on Node v18)
110+ //
111+ process . on ( 'uncaughtException' , ( err , origin ) => {
101112 console . error ( err , { origin } ) ;
102113 this . config . logger . fatal ( err , { origin } ) ;
103114 } ) ;
You can’t perform that action at this time.
0 commit comments