Added warn log for failed e-mail renders.

This commit is contained in:
2026-07-21 04:34:21 +02:00
parent 0d481e7798
commit 49ef28a5bf

View File

@@ -515,6 +515,7 @@ async function sendEmailAlerts() {
const triggers = markedNotifications
.map((notification) => ({
notificationId: notification.id,
scene: scenesBySceneId[notification.scene_id] || null,
posterUrl: getImagePath(scenesBySceneId[notification.scene_id]?.poster),
user: usersByUserId[notification.user_id] || null,
@@ -556,6 +557,7 @@ async function sendEmailAlerts() {
};
}
catch (error) {
logger.warn(`Failed to render e-mail for '${user.username}' with scenes ${userTriggers.map((trigger) => `${trigger.notificationId}: ${trigger.scene.id}`)}: ${error.message}`);
return null;
}
})).then((allEmails) => allEmails.filter(Boolean));