Error object rather than string, which allows for better verification of the HTTP status code of the response.

This commit is contained in:
Mark Wubben 2010-07-28 19:24:56 +02:00
parent c8393eb053
commit 33df3dfd17

View File

@ -221,7 +221,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
}); });
response.addListener('end', function () { response.addListener('end', function () {
if( response.statusCode != 200 ) { if( response.statusCode != 200 ) {
callback( response.statusCode +" : " + data ); callback({ statusCode: response.statusCode, data: data });
} else { } else {
callback(null, data, response); callback(null, data, response);
} }