From 00648e7ad67abcab13dd750f63a0154efa67cbe9 Mon Sep 17 00:00:00 2001 From: Ariel Weinberger Date: Sat, 3 Feb 2024 17:03:19 +0100 Subject: [PATCH] fix: wrap sendgrid call with try-catch --- apps/server/src/app/notifications/notifications.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/server/src/app/notifications/notifications.service.ts b/apps/server/src/app/notifications/notifications.service.ts index c5a6d84a..cdf37791 100644 --- a/apps/server/src/app/notifications/notifications.service.ts +++ b/apps/server/src/app/notifications/notifications.service.ts @@ -30,6 +30,10 @@ export class NotificationsService { }, }; - await sgMail.send(mailData); + try { + await sgMail.send(mailData); + } catch (error) { + this.logger.error(error); + } } }