Skip to content

Commit

Permalink
Fill 'response' property in error instance
Browse files Browse the repository at this point in the history
This makes the behavior when using callbacks consistent with
the promise counterpart
  • Loading branch information
sitegui authored and shkabo committed Oct 5, 2016
1 parent 4af97d8 commit c3b52ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sendgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ SendGridInstance.prototype.API = function(request, callback) {
}
else {
var error = new SendGridError('Response error');
error.response = response;
callback(error, response);
}
});
Expand Down

0 comments on commit c3b52ad

Please sign in to comment.