Skip to content

Add onErrorComplete operator and rework onErrorReturn#3159

Merged
simonbasle merged 5 commits into3.4.xfrom
fluxOnErrorReturnOrComplete
Aug 29, 2022
Merged

Add onErrorComplete operator and rework onErrorReturn#3159
simonbasle merged 5 commits into3.4.xfrom
fluxOnErrorReturnOrComplete

Conversation

@simonbasle
Copy link
Copy Markdown
Contributor

This PR introduces a new implementation that optimizes the onErrorReturn case to avoid going through a generated Publisher.

Additionally, this implementation can easily accept a null fallback value, which covers a common case that has since now been covered by onErrorResume(e -> Mono.empty()).

We take that as an opportunity to introduce a convenient onErrorComplete operator for that later case.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants