From 4e090411fe8bfd8c0027a18bd1cb46339f7e6538 Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 3 Aug 2026 20:05:44 +0200 Subject: [PATCH] fix(server): stop a failed notification import from crashing the run The fire-and-forget notification sends guard the send() call but not the dynamic import around it, so a rejected import escapes as an unhandled rejection. In CI that surfaced as an EnvironmentTeardownError from vacay after the suite had already passed, failing the run with every test green. trips, packing and collections already catch on the import chain; collab and the two vacay sends were missing it. --- server/src/nest/collab/collab.service.ts | 2 +- server/src/nest/vacay/vacay.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/nest/collab/collab.service.ts b/server/src/nest/collab/collab.service.ts index cf1f0f933..cf6a4d17b 100644 --- a/server/src/nest/collab/collab.service.ts +++ b/server/src/nest/collab/collab.service.ts @@ -500,6 +500,6 @@ export class CollabService { const params: Record = { trip: tripInfo?.title || 'Untitled', actor: actor.email, tripId: String(tripId) }; if (preview !== undefined) params.preview = preview; send({ event: 'collab_message', actorId: actor.id, scope: 'trip', targetId: Number(tripId), params }).catch(() => {}); - }); + }).catch(() => {}); } } diff --git a/server/src/nest/vacay/vacay.service.ts b/server/src/nest/vacay/vacay.service.ts index 80b9ab0c8..f8dd97d3e 100644 --- a/server/src/nest/vacay/vacay.service.ts +++ b/server/src/nest/vacay/vacay.service.ts @@ -636,7 +636,7 @@ export class VacayService { // Notify invited user import('../notifications/notifications.bridge').then(({ send }) => { send({ event: 'vacay_invite', actorId: inviterId, scope: 'user', targetId: targetUserId, params: { actor: inviterEmail, planId: String(planId) } }).catch(() => {}); - }); + }).catch(() => {}); return {}; } @@ -867,7 +867,7 @@ export class VacayService { import('../notifications/notifications.bridge').then(({ send }) => { send({ event: 'vacay_share', actorId: ownerId, scope: 'user', targetId: targetUserId, params: { actor: ownerEmail } }).catch(() => {}); - }); + }).catch(() => {}); return {}; }