From 4eecd5acec56547e5b5ab064f52dc81eb451e1a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Wed, 19 Jul 2023 06:41:32 -0300 Subject: [PATCH] fix(all): Create bot working again. --- src/app.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app.ts b/src/app.ts index 616f5d58..869146d8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -114,9 +114,13 @@ export class GBServer { }); process.on('uncaughtException', (err, p) => { - GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''}`); + if (err !== null) { + GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''}`); + } else { + GBLog.error('UNCAUGHT_EXCEPTION: Unknown error (err is null)'); + } }); - + process.on('SIGTERM', () => { GBLog.info('SIGTERM signal received.'); });