Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions connect/notificationServices/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ function handleScheduledEvents(events, setEventsStatus) {
+ ` with body ${JSON.stringify(eventMessage)} to bus api`);

setEventsStatus(userEvents, SCHEDULED_EVENT_STATUS.COMPLETED);
}).catch(() => {
}).catch((err) => {
logger.error(`Failed to send ${BUS_API_EVENT.EMAIL.GENERAL} event`
+ ` with body ${JSON.stringify(eventMessage)} to bus api`);
+ `; error: ${err.message}`
+ `; with body ${JSON.stringify(eventMessage)} to bus api`);

setEventsStatus(userEvents, SCHEDULED_EVENT_STATUS.FAILED);
});
Expand Down Expand Up @@ -343,6 +344,11 @@ function handler(topicName, messageJSON, notification) {
payload: eventMessage,
}).then(() => {
logger.info(`Successfully sent ${eventType} event with body ${JSON.stringify(eventMessage)} to bus api`);
})
.catch((err) => {
logger.error(`Failed to send ${eventType} event`
+ `; error: ${err.message}`
+ `; with body ${JSON.stringify(eventMessage)} to bus api`);
});
}
});
Expand Down