diff --git a/src/main/java/com/couchbase/client/java/CouchbaseAsyncBucket.java b/src/main/java/com/couchbase/client/java/CouchbaseAsyncBucket.java index d13063db..39df45fc 100644 --- a/src/main/java/com/couchbase/client/java/CouchbaseAsyncBucket.java +++ b/src/main/java/com/couchbase/client/java/CouchbaseAsyncBucket.java @@ -1963,8 +1963,8 @@ public DocumentFragment call(E element) { return ResultMappingUtils.convertToSubDocumentResult(ResponseStatus.SUCCESS, mutationOperation, element); } }); - } else if (throwable instanceof MultiMutationException && throwable.getCause() instanceof PathNotFoundException) { - return Observable.just(ResultMappingUtils.convertToSubDocumentResult(ResponseStatus.SUCCESS, mutationOperation, null)); + } else if (throwable.getCause() instanceof PathNotFoundException) { + return Observable.just(ResultMappingUtils.convertToSubDocumentResult(ResponseStatus.NOT_EXISTS, mutationOperation, null)); } else { return Observable.error(throwable); } @@ -1986,6 +1986,8 @@ public E call(DocumentFragment documentFragment) { } else { return (E) val; } + } else if (status == ResponseStatus.NOT_EXISTS) { + return null; } else { throw new CouchbaseException(status.toString()); }