diff --git a/app/notification-queue/server/NotificationQueue.ts b/app/notification-queue/server/NotificationQueue.ts index 7665a588c8ee0..c75fea43663d0 100644 --- a/app/notification-queue/server/NotificationQueue.ts +++ b/app/notification-queue/server/NotificationQueue.ts @@ -41,7 +41,14 @@ class NotificationClass { return; } - setTimeout(this.worker.bind(this), this.cyclePause); + setTimeout(() => { + try { + this.worker.bind(this); + } catch (e) { + console.error('Error sending notification', e); + this.executeWorkerLater.bind(this); + } + }, this.cyclePause); } async worker(counter = 0): Promise {