Error object rather than string, which allows for better verification of the HTTP status code of the response.
This commit is contained in:
		| @ -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); | ||||
|       } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user