Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
Description
This tripped me up while doing txns porting. Currently have Mono<GetResult> get("id"), which does Mono.empty() if the doc was not found.
This model is easy to get wrong. Mono.empty raises no onNext, so it's very easy to write an app that simply gets no signal and does nothing if the doc is not found.
The app can handle it with .defaultOnEmpty. But it seems better to make this more explicit and harder to get wrong, and change Mono<GetResult> to Mono<Optional<GetResult>>. This will apply to LookupIn too.