From aeb523d818e351362851cb452b3706e1fb4be168 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Fri, 13 Feb 2015 01:21:00 +0200 Subject: [PATCH] better error message to configured channel --- routes/invite.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/invite.js b/routes/invite.js index 1e046b8..22082f2 100644 --- a/routes/invite.js +++ b/routes/invite.js @@ -22,8 +22,9 @@ module.exports = function (app) { slack .createInvite(req.body.email) .then(success) - .catch(function() { - return slack.createMessage('Invitation request for: ' + req.body.email); + .catch(function(err) { + var message = 'Creating automatic invitation failed for: ' + req.body.email + ' reason: ' + err; + return slack.createMessage(message); }) .then(success) .catch(function(err) {