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.
This commit is contained in:
Maurice
2026-08-03 20:05:44 +02:00
committed by Maurice
parent 8ab50dcbbb
commit 4e090411fe
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -500,6 +500,6 @@ export class CollabService {
const params: Record<string, string> = { 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(() => {});
}
}
+2 -2
View File
@@ -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 {};
}