Skip to content

Commit

Permalink
fixed ttezel#256 (promise rejections)
Browse files Browse the repository at this point in the history
  • Loading branch information
remmycat committed Jul 20, 2016
1 parent f5bf81c commit d8b367c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit d8b367c

Please sign in to comment.