Updated docs button group on Twilio page.

Pass err.message instead of error object to the middleware.
This commit is contained in:
Sahat Yalkabov
2014-02-06 08:33:37 -05:00
parent 78a3e681fb
commit aec3807d34
2 changed files with 6 additions and 6 deletions

View File

@@ -396,7 +396,7 @@ exports.postTwilio = function(req, res, next) {
body: 'Hello from the Hackathon Starter'
};
twilio.sendMessage(message, function(err, responseData) {
if (err) return next(err);
if (err) return next(err.message);
req.flash('success', { msg: 'Text sent to ' + responseData.to + '.'})
res.redirect('/api/twilio');
});