Permalink
Browse files

Merge pull request #46 from privman/master

Improve output when receiving non-JSON from server
  • Loading branch information...
2 parents 6c9292e + 2a7f936 commit 33778680d19a50c0572990ebeb1bfcb8fecaa743 Alexey committed Sep 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/couchdb.js
View
2 lib/couchdb.js
@@ -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) {

0 comments on commit 3377868

Please sign in to comment.