From e5e8a852cba3db967c403b2011efe14931797b30 Mon Sep 17 00:00:00 2001 From: nishant Date: Mon, 27 Nov 2017 13:49:51 +0530 Subject: [PATCH] pass error object to the callbacks for failed send Api calls --- lib/Facebook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Facebook.js b/lib/Facebook.js index bff34d432..ead9cf4a1 100644 --- a/lib/Facebook.js +++ b/lib/Facebook.js @@ -157,7 +157,7 @@ function Facebookbot(configuration) { if (body.error) { botkit.debug('API ERROR', body.error); - return cb && cb(body.error.message); + return cb && cb(body.error); } botkit.debug('WEBHOOK SUCCESS', body);