From 33df3dfd179d86f2868303ec31e5fadd1abb4b68 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Wed, 28 Jul 2010 19:24:56 +0200 Subject: [PATCH] Error object rather than string, which allows for better verification of the HTTP status code of the response. --- lib/oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauth.js b/lib/oauth.js index c494fe3..5955ded 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -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); }