Comparing version 3.3.0 to 3.3.1
@@ -290,2 +290,5 @@ /* minimal couch in node | ||
if (!parsed) { parsed = {}; } | ||
if (!parsed.message && (parsed.reason || parsed.error)) { | ||
parsed.message = (parsed.reason || parsed.error); | ||
} | ||
errs.handle(errs.merge(errs.create(parsed), | ||
@@ -292,0 +295,0 @@ { "scope" : "couch" |
@@ -5,3 +5,3 @@ { "name" : "nano" | ||
, "repository" : "git://github.com/dscape/nano" | ||
, "version" : "3.3.0" | ||
, "version" : "3.3.1" | ||
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -28,2 +28,3 @@ , "contributors" : | ||
, "Jay Beavers <jay.beavers@microsoft.com> (http://jaybeavers.org)" | ||
, "Juraj Vitko" | ||
] | ||
@@ -30,0 +31,0 @@ , "keywords" : |
@@ -512,3 +512,3 @@ # nano | ||
, callback = console.log // this would normally be some callback | ||
, nano require('nano')( | ||
, alice = require('nano')( | ||
{ url : 'http://localhost:5984/alice', cookie: 'AuthSession=' + auth }); | ||
@@ -515,0 +515,0 @@ ; |
@@ -23,2 +23,7 @@ [ | ||
, { "method" : "delete" | ||
, "path" : "/say_wat_wat" | ||
, "status" : 404 | ||
, "response" : "{\"error\":\"not_found\",\"reason\":\"missing\"}" | ||
} | ||
, { "method" : "delete" | ||
, "path" : "/shared_error" | ||
@@ -25,0 +30,0 @@ , "response" : "{ \"ok\": true }" |
@@ -81,2 +81,10 @@ var specify = require("specify") | ||
specify("shared_error:bad_delete", timeout, function (assert) { | ||
nano.db.destroy("say_wat_wat", function (error, response) { | ||
assert.ok(error, "There must be an error"); | ||
assert.ok(error.message, "A note is given"); | ||
assert.equal(error.description,'missing'); | ||
}); | ||
}); | ||
specify("shared_error:teardown", timeout, function (assert) { | ||
@@ -83,0 +91,0 @@ nano.db.destroy("shared_error", function (err) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
145610
3485