fix: notification sending fails caused flows relying on it to break
This commit is contained in:
parent
595e215dd5
commit
2a5dacc088
2 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,3 @@
|
|||
// const configManager = require('./new-config-manager')
|
||||
const logger = require('./logger')
|
||||
const ph = require('./plugin-helper')
|
||||
|
||||
function sendMessage (settings, rec) {
|
||||
|
|
|
|||
|
|
@ -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}`))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue