Comparing version 3.1.2 to 3.1.3
77
nano.js
@@ -147,5 +147,5 @@ /* minimal couch in node | ||
return errs.handle(errs.merge(error, | ||
{ "note" : "couldnt encode: " + (opts && opts.doc) + " as an uri" | ||
, "scope" : "nano" | ||
, "errid" : "encode_uri" | ||
{ "message": "couldnt encode: "+(opts && opts.doc)+" as an uri" | ||
, "scope" : "nano" | ||
, "errid" : "encode_uri" | ||
}), callback); | ||
@@ -188,5 +188,5 @@ } | ||
return errs.handle(errs.merge(err, | ||
{ "note" : "bad params: " + key + " = " + params[key] | ||
, "scope" : "nano" | ||
, "errid" : "encode_keys" | ||
{ "message": "bad params: " + key + " = " + params[key] | ||
, "scope" : "nano" | ||
, "errid" : "encode_keys" | ||
}), callback); | ||
@@ -198,5 +198,5 @@ } | ||
return errs.handle(errs.merge(err6, | ||
{ "note" : "params is not an object" | ||
, "scope" : "nano" | ||
, "errid" : "bad_params" | ||
{ "messsage": "params is not an object" | ||
, "scope" : "nano" | ||
, "errid" : "bad_params" | ||
}), callback); | ||
@@ -210,5 +210,5 @@ } | ||
return errs.handle(errs.merge(err2, | ||
{ "note" : "invalid params: " + params.toString() | ||
, "scope" : "nano" | ||
, "errid" : "encode_params" | ||
{ "message": "invalid params: " + params.toString() | ||
, "scope" : "nano" | ||
, "errid" : "encode_params" | ||
}), callback); | ||
@@ -235,5 +235,5 @@ } | ||
return errs.handle(errs.merge(err3, | ||
{ "note" : "body seems to be invalid json" | ||
, "scope" : "nano" | ||
, "errid" : "encode_body" | ||
{ "message": "body seems to be invalid json" | ||
, "scope" : "nano" | ||
, "errid" : "encode_body" | ||
}), callback); | ||
@@ -258,5 +258,5 @@ } | ||
return errs.handle(errs.merge(err4, | ||
{ "note" : "request threw when you tried to stream" | ||
, "scope" : "request" | ||
, "errid" : "stream" | ||
{ "message": "request threw when you tried to stream" | ||
, "scope" : "request" | ||
, "errid" : "stream" | ||
}), callback); | ||
@@ -276,5 +276,5 @@ } | ||
errs.handle(errs.merge(e, | ||
{ "note" : "error happened during your connection" | ||
, "scope" : "socket" | ||
, "errid" : "request" | ||
{ "message": "error happened in your connection" | ||
, "scope" : "socket" | ||
, "errid" : "request" | ||
}), callback); | ||
@@ -304,2 +304,3 @@ return stream; | ||
, "errid" : "non_200" | ||
, "message" : parsed.reason || "couch returned "+status_code | ||
}), callback); | ||
@@ -312,5 +313,5 @@ return stream; | ||
return errs.merge(err5, | ||
{ "note" : "request threw when you tried to create the object" | ||
, "scope" : "request" | ||
, "errid" : "callback" | ||
{ "message": "request threw when you tried to create the object" | ||
, "scope" : "request" | ||
, "errid" : "callback" | ||
}); | ||
@@ -491,5 +492,5 @@ } | ||
var stream = errs.handle( | ||
{ "note" : "follow is only supported on node 0.6+" | ||
, "scope" : "follow" | ||
, "errid" : "no_soup_for_you" | ||
{ "message": "follow is only supported on node 0.6+" | ||
, "scope" : "follow" | ||
, "errid" : "no_soup_for_you" | ||
}, callback); | ||
@@ -499,5 +500,5 @@ // streaming mode will call unexisting follow stream | ||
return errs.handle( | ||
{ "note" : "follow is only supported on node 0.6+" | ||
, "scope" : "follow" | ||
, "errid" : "no_soup_for_you" | ||
{ "message": "follow is only supported on node 0.6+" | ||
, "scope" : "follow" | ||
, "errid" : "no_soup_for_you" | ||
}, callback); | ||
@@ -538,5 +539,5 @@ }; | ||
return errs.handle(errs.create( | ||
{ "note" : "replication target is invalid" | ||
, "scope" : "nano" | ||
, "errid" : "replication_target" | ||
{ "message": "replication target is invalid" | ||
, "scope" : "nano" | ||
, "errid" : "replication_target" | ||
}), callback); | ||
@@ -552,5 +553,5 @@ } | ||
return errs.handle(errs.create( | ||
{ "note" : "replication source is invalid" | ||
, "scope" : "nano" | ||
, "errid" : "replication_source" | ||
{ "message": "replication source is invalid" | ||
, "scope" : "nano" | ||
, "errid" : "replication_source" | ||
}), callback); | ||
@@ -938,3 +939,3 @@ } | ||
{ "scope" : "init" | ||
, "note" : "couldn't read config file " + cfg | ||
, "message" : "couldn't read config file " + cfg | ||
, "errid" : "bad_file" | ||
@@ -949,3 +950,3 @@ }); | ||
{ "scope" : "init" | ||
, "note" : "no configuration with a valid url was given" | ||
, "message" : "no configuration with a valid url was given" | ||
, "errid" : "bad_url" | ||
@@ -952,0 +953,0 @@ }); |
@@ -5,3 +5,3 @@ { "name" : "nano" | ||
, "repository" : "git://github.com/dscape/nano" | ||
, "version" : "3.1.2" | ||
, "version" : "3.1.3" | ||
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -8,0 +8,0 @@ , "contributors" : |
@@ -28,2 +28,3 @@ var specify = require("specify") | ||
assert.equal(error["status-code"], 409, "Should be conflict"); | ||
assert.equal(error.message, error.reason, "Message should be reason"); | ||
assert.equal(error.scope, "couch", "Scope is couch"); | ||
@@ -39,3 +40,3 @@ assert.equal(error.error, "conflict", "Error is conflict"); | ||
assert.ok(err, "There must be an error"); | ||
assert.ok(err.note, "A note is given"); | ||
assert.ok(err.message, "A note is given"); | ||
assert.equal(err.errid, "bad_file", "Code is right"); | ||
@@ -48,3 +49,3 @@ assert.equal(err.scope, "init", "Scope is init"); | ||
assert.ok(err2, "There must be an error"); | ||
assert.ok(err2.note, "A note is given"); | ||
assert.ok(err2.message, "A note is given"); | ||
assert.equal(err2.errid, "bad_url", "Code is right"); | ||
@@ -68,3 +69,3 @@ assert.equal(err2.scope, "init", "Scope is init"); | ||
db.list("bad params").on('error', function (error) { | ||
assert.ok(error.note, "A note is given"); | ||
assert.ok(error.message, "A note is given"); | ||
assert.equal(error.errid, "bad_params", "Code is right"); | ||
@@ -78,3 +79,3 @@ assert.equal(error.scope, "nano", "Scope exists"); | ||
assert.ok(error, "There must be an error"); | ||
assert.ok(error.note, "A note is given"); | ||
assert.ok(error.message, "A note is given"); | ||
assert.equal(error.errid, "bad_params", "Code is right"); | ||
@@ -81,0 +82,0 @@ assert.equal(error.scope, "nano", "Scope exists"); |
Sorry, the diff of this file is not supported yet
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
138013
3322