getMulti returns error when it fails to find a key

When I do a getMulti (or a get for that matter) for a key that doesn't exist, it's returning an error:
[Error: At least one of your operations failed, check the results object for more information.] code: 4101

And in the missing key:
error: { [Error: The key does not exist on the server] code: 13

According to the documentation missing keys shouldn't result in errors. Am I doing something wrong?

Where in the documentation does it say that? This is the expected behavior.

You can test for it and ignore this error if you'd like.

err.code === couchbase.errors.keyNotFound 

FYI, this will also happen if you try to delete a key that doesn't exist.

1 Answer

« Back to question.

In http://docs.couchbase.com/couchbase-sdk-node-1.2/index.html
it states "If the key does not exist on the server, the callback will be invoked with an unset value property on the result objects (it will not set the callbacks error parameter)."