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.

@simonbasle simonbasle requested a review from a team as a code owner August 18, 2022 17:28
@simonbasle simonbasle added this to the 3.4.x Backlog milestone Aug 18, 2022
@simonbasle simonbasle added the type/enhancement A general enhancement label Aug 18, 2022
@simonbasle simonbasle self-assigned this Aug 18, 2022
@simonbasle simonbasle requested a review from a team August 18, 2022 17:28
@simonbasle simonbasle marked this pull request as draft August 19, 2022 08:46
@simonbasle simonbasle force-pushed the fluxOnErrorReturnOrComplete branch from 3858119 to 3e935ff Compare August 19, 2022 09:21
@simonbasle
Copy link
Copy Markdown
Contributor Author

(rebased on latest 3.4.x and squashed the numerous commits into a single one)

@simonbasle
Copy link
Copy Markdown
Contributor Author

simonbasle commented Aug 19, 2022

TODO:

  • marble diagram for onErrorComplete
  • validate the name
  • reference it in the refguide / operator choice matrix

@simonbasle simonbasle marked this pull request as ready for review August 25, 2022 13:43
@simonbasle simonbasle modified the milestones: 3.4.x Backlog, 3.4.23 Aug 29, 2022
@simonbasle simonbasle merged commit 4c0b791 into 3.4.x Aug 29, 2022
@simonbasle simonbasle deleted the fluxOnErrorReturnOrComplete branch August 29, 2022 13:51
@reactorbot
Copy link
Copy Markdown

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

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