Added warn log for failed e-mail renders.
This commit is contained in:
@@ -515,6 +515,7 @@ async function sendEmailAlerts() {
|
|||||||
|
|
||||||
const triggers = markedNotifications
|
const triggers = markedNotifications
|
||||||
.map((notification) => ({
|
.map((notification) => ({
|
||||||
|
notificationId: notification.id,
|
||||||
scene: scenesBySceneId[notification.scene_id] || null,
|
scene: scenesBySceneId[notification.scene_id] || null,
|
||||||
posterUrl: getImagePath(scenesBySceneId[notification.scene_id]?.poster),
|
posterUrl: getImagePath(scenesBySceneId[notification.scene_id]?.poster),
|
||||||
user: usersByUserId[notification.user_id] || null,
|
user: usersByUserId[notification.user_id] || null,
|
||||||
@@ -556,6 +557,7 @@ async function sendEmailAlerts() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (error) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
})).then((allEmails) => allEmails.filter(Boolean));
|
})).then((allEmails) => allEmails.filter(Boolean));
|
||||||
|
|||||||
Reference in New Issue
Block a user