Adding exception handling to the couchbase side