diff --git a/lib/email.js b/lib/email.js index 3dd5d6ee..2d96ea18 100644 --- a/lib/email.js +++ b/lib/email.js @@ -1,5 +1,3 @@ -// const configManager = require('./new-config-manager') -const logger = require('./logger') const ph = require('./plugin-helper') function sendMessage (settings, rec) { diff --git a/lib/notifier/index.js b/lib/notifier/index.js index 81baf3ba..ab75d84e 100644 --- a/lib/notifier/index.js +++ b/lib/notifier/index.js @@ -212,6 +212,7 @@ function complianceNotify (customer, deviceId, action, period) { notifyIfActive('compliance', 'customerComplianceNotify', customer, deviceId, action, period) return Promise.all(promises) + .catch(err => console.error(`An error occurred when sending a notification. Please check your notification preferences and 3rd party account configuration: ${err.stack}`)) }) } @@ -259,6 +260,7 @@ function sendTransactionMessage (rec, isHighValueTx) { if (webhookActive) promises.push(webhookFuncs.sendMessage(settings, rec)) return Promise.all(promises) + .catch(err => console.error(`An error occurred when sending a notification. Please check your notification preferences and 3rd party account configuration: ${err.stack}`)) }) } @@ -301,6 +303,7 @@ function cashboxNotify (deviceId) { notifyIfActive('security', 'cashboxNotify', deviceId) return Promise.all(promises) + .catch(err => console.error(`An error occurred when sending a notification. Please check your notification preferences and 3rd party account configuration: ${err.stack}`)) }) }