diff --git a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java index 5bacc02c..d461e72b 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java +++ b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java @@ -119,7 +119,7 @@ public class SimpleReactiveCouchbaseRepository imple public Mono findOne(ID id) { Assert.notNull(id, "The given id must not be null!"); return mapMono(operations.findById(id.toString(), entityInformation.getJavaType()).toSingle()) - .otherwise(throwable -> { + .onErrorResume(throwable -> { //reactive streams adapter doesn't work with null if(throwable instanceof NullPointerException) { return Mono.empty();