diff --git a/lib/twitter.js b/lib/twitter.js index 6a0142fb..75246200 100644 --- a/lib/twitter.js +++ b/lib/twitter.js @@ -116,6 +116,10 @@ Twitter.prototype.request = function (method, path, params, callback) { if (callback && typeof callback === 'function') { callback(err, parsedBody, resp); + } else if (err) { + err.data = parsedBody; + err.twitterReply = resp; + _returnErrorToUser(err); } resolve({ data: parsedBody, resp: resp });