Skip to content

Commit

Permalink
Improve output when receiving non-JSON from server
Browse files Browse the repository at this point in the history
  • Loading branch information
privman committed Sep 20, 2012
1 parent e11bbff commit 2a7f936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/couchdb.js
Expand Up @@ -226,7 +226,7 @@ exports.createClient = function(port, host, user, pass, maxListeners, secure) {
json = JSON.parse(buffer);
} catch (e) {
cbFired = true;
return cb && cb(new Error('invalid json: '+json+" "+e.message));
return cb && cb(new Error('invalid json: "'+buffer+'". '+e.message));
}

if ('error' in json) {
Expand Down

0 comments on commit 2a7f936

Please sign in to comment.