From ccfa79cbe33bdb9aa3564ba956185e3e51991717 Mon Sep 17 00:00:00 2001 From: abdou6666 Date: Mon, 6 Jan 2025 10:15:05 +0100 Subject: [PATCH 1/2] fix: main.ts --- api/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main.ts b/api/src/main.ts index c6be3147..12dfef25 100644 --- a/api/src/main.ts +++ b/api/src/main.ts @@ -85,7 +85,7 @@ async function bootstrap() { } process.on('uncaughtException', (error) => { - if (error.stack.toLowerCase().includes('smtp')) + if (error.stack && error.stack.toLowerCase().includes('smtp')) app.get(LoggerService).error('SMTP error', error.stack); else throw error; }); From f9b2d4495d02b084b37d8bc218bac83bfd0239cd Mon Sep 17 00:00:00 2001 From: abdou6666 Date: Mon, 6 Jan 2025 11:52:50 +0100 Subject: [PATCH 2/2] fix: address comment --- api/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main.ts b/api/src/main.ts index 12dfef25..1f30cb70 100644 --- a/api/src/main.ts +++ b/api/src/main.ts @@ -85,7 +85,7 @@ async function bootstrap() { } process.on('uncaughtException', (error) => { - if (error.stack && error.stack.toLowerCase().includes('smtp')) + if (error.stack?.toLowerCase().includes('smtp')) app.get(LoggerService).error('SMTP error', error.stack); else throw error; });