Compare commits

...

1 Commits

Author SHA1 Message Date
Kerkesni d2fcaef506
allow crashing on uncaugh exception 2023-10-10 10:57:26 +02:00
1 changed files with 11 additions and 11 deletions

View File

@ -78,17 +78,17 @@ class S3Server {
process.on('SIGTERM', this.cleanUp.bind(this)); process.on('SIGTERM', this.cleanUp.bind(this));
process.on('SIGPIPE', () => { }); process.on('SIGPIPE', () => { });
// This will pick up exceptions up the stack // This will pick up exceptions up the stack
process.on('uncaughtException', err => { // process.on('uncaughtException', err => {
// If just send the error object results in empty // // If just send the error object results in empty
// object on server log. // // object on server log.
logger.fatal('caught error', { // logger.fatal('caught error', {
error: err.message, // error: err.message,
stack: err.stack, // stack: err.stack,
workerId: this.worker ? this.worker.id : undefined, // workerId: this.worker ? this.worker.id : undefined,
workerPid: this.worker ? this.worker.process.pid : undefined, // workerPid: this.worker ? this.worker.process.pid : undefined,
}); // });
this.caughtExceptionShutdown(); // this.caughtExceptionShutdown();
}); // });
this.started = false; this.started = false;
} }