-
Notifications
You must be signed in to change notification settings - Fork 157
error object not properly formatted #317
Comments
I get the same malformed error messages (here is example of attempting to create database that exists): nano.db.create('testdb', function(err, body) {
if (err) {
console.log(err);
}
});
When done with curl: {
"error" : "file_exists",
"reason" : "The database could not be created, the file already exists."
} |
It seems this is a |
Hi @jcferrer and @cboden, my impression is that the nano documentation is out of date. The 'status-code' property no longer exists, and it has been replaced by 'statusCode'. I filed issue #328 for this. Regarding the 'message' propery, I think that property is output like [Error: ] by Node.js, so nano is ok there. I see this issue was filed a couple months ago, so you've likely moved on, but does this reply address your question? |
It seems that this question has been answered, if so could you close this issue? |
On a db.get with an invalid doc Id, the error returned is not properly formatted.
The error object looks like this:
I saw in one of the examples references to the error object like the following, where the error object seems to have a message and a 'status-code' property:
Please advise.
The text was updated successfully, but these errors were encountered: