diff --git a/src/alerts.js b/src/alerts.js index 2ff633f..2d624ec 100755 --- a/src/alerts.js +++ b/src/alerts.js @@ -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));