Skip to content

Commit 05c3b3d

Browse files
Merge pull request #299 from sitegui/responseInError
Fill 'response' property in error instance
2 parents 0bca9d6 + 165f74c commit 05c3b3d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/sendgrid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ SendGridInstance.prototype.API = function(request, callback) {
111111
}
112112
else {
113113
var error = new SendGridError('Response error');
114+
error.response = response;
114115
callback(error, response);
115116
}
116117
});

0 commit comments

Comments
 (0)