From 0bbebe739806e66827902fcba3d67b1795630a44 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 25 Jul 2024 03:56:52 -0700 Subject: fix(notifications): try/catch sendNotification --- src/trigger/notifications.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/trigger/notifications.ts b/src/trigger/notifications.ts index a78f1f9b..0e1e415f 100644 --- a/src/trigger/notifications.ts +++ b/src/trigger/notifications.ts @@ -31,7 +31,11 @@ export const notificationsTask = schedules.task({ ); for (const subscription of await getUserSubscriptions()) - await webpush.sendNotification(subscription['subscription'], '.'); + try { + await webpush.sendNotification(subscription['subscription'], '.'); + } catch (error) { + console.error(error); + } return {}; } -- cgit v1.2.3