Added warn log for failed e-mail renders.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user