Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error dissolution with layered recovery strategy #18

Open
lyzkov opened this issue Aug 8, 2021 · 1 comment
Open

Error dissolution with layered recovery strategy #18

lyzkov opened this issue Aug 8, 2021 · 1 comment
Labels
backbone Regrounding is desired enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@lyzkov
Copy link
Owner

lyzkov commented Aug 8, 2021

It is highly recommended to propagate faults through a dedicated error pipeline instead of stream output to take advantage of Combine consistency leveraging try operators in a throwable manner.

Faults should pass over at most three recovery layers before displaying the recovery message in the exception view.

  1. System space - providing debug instructions to resolve a source of recurring error.
  2. Application space - providing severity that promotes fluency over verbosity so triviality bloats are diminished.
  3. User space - providing exceptional flow enabling users to decide about critical actions (system alert with buttons) or recovery view to excuse a cumbersome hit.

The recovery strategy should involve:

  • Ignoring erroring occurrence:
    • Empty completion of a single value stream.
    • Continuation of multiple values stream.
  • Retrying from an erroring occurrence which results in subscribing to upstream once again.
  • Passing error downstream through transcription gate providing contextual description about nuisance.

For handler convenience, it should be possible to materialize erroring stream completion to Result type.

As a bonus point, recovery could involve debugging mode that collects logs with traces on every step.

The above strategy, metaphorically reduced to a battleship game, adopts Abort, Retry, Fail? anti-pattern and assesses the holistic approach of dealing with bugs. Primely reintroduced and documented in SinkEmAll asks for exhaustive exploration.

Please take care and good luck! ^^

@lyzkov lyzkov added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 8, 2021
@lyzkov lyzkov added this to the Decomposition milestone Aug 9, 2021
@lyzkov lyzkov added the backbone Regrounding is desired label Aug 9, 2021
@lyzkov lyzkov changed the title Error dissolution with recovery strategy Error dissolution with layered recovery strategy Sep 1, 2022
@lyzkov
Copy link
Owner Author

lyzkov commented Oct 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backbone Regrounding is desired enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant