Permalink
Browse files

Improve output when receiving non-JSON from server

  • Loading branch information...
1 parent e11bbff commit 2a7f9360d2b2af8f39df214d57446abb17b46282 @privman privman committed Sep 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/couchdb.js
View
@@ -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 2a7f936

Please sign in to comment.