From 57a80b854c13ead67b26092a808e8ecb4439fc11 Mon Sep 17 00:00:00 2001 From: Sagar Mehta Date: Wed, 4 Sep 2013 13:49:49 -0700 Subject: [PATCH] switched error text to prefer whatever is in info.text field even in case of oauth error --- lib/Connection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 11ea916..35c2e55 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1328,10 +1328,10 @@ Connection.prototype._resTagged = function(info) { if (info.type === 'no' || info.type === 'bad') { var errtext; - if (req.oauthError) - errtext = req.oauthError; + if (info.text) + errtext = info.text; else - errtext = info.text; + errtext = req.oauthError; err = new Error(errtext); err.type = info.type; err.textCode = info.textCode;