diff --git a/lib/config/config.json.dist b/lib/config/config.json.dist index b396cf8..5344887 100644 --- a/lib/config/config.json.dist +++ b/lib/config/config.json.dist @@ -46,6 +46,7 @@ "username": "bot@domain-xmpp.ltd", "password": "botPass", "resource": "botservice", + "errorReply": "Oops, something went wrong :(", "rooms": [ { "id": "roomname@conference.domain-xmpp.ltd", diff --git a/lib/xmpp/index.js b/lib/xmpp/index.js index 62971f6..8c6f22c 100644 --- a/lib/xmpp/index.js +++ b/lib/xmpp/index.js @@ -135,6 +135,9 @@ module.exports = (logger, config) => { case 'outgoing_webhook': logger.debug(`Call outgoing webhook: ${xmppHook.args[0]}`) outgoing(logger, config, this, from.toString(), replyTo.toString(), message, type, xmppHook.args[0]) + .catch(() => { + this.send(replyTo.toString(), config.xmpp.errorReply, type) + }) break default: break diff --git a/test/config.json b/test/config.json index fc3534d..31094d5 100644 --- a/test/config.json +++ b/test/config.json @@ -46,6 +46,7 @@ "username": "bot@domain-xmpp.ltd", "password": "botPass", "resource": "botservice", + "errorReply": "Oops, something went wrong :(", "rooms": [ { "id": "roomname@conference.domain-xmpp.ltd",