Error object rather than string, which allows for better verification of the HTTP status code of the response.
This commit is contained in:
parent
c8393eb053
commit
33df3dfd17
@ -221,7 +221,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
|
||||
});
|
||||
response.addListener('end', function () {
|
||||
if( response.statusCode != 200 ) {
|
||||
callback( response.statusCode +" : " + data );
|
||||
callback({ statusCode: response.statusCode, data: data });
|
||||
} else {
|
||||
callback(null, data, response);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user