Correctly handle some common couchbase error codes.