Best practices to present error when there are viewable and not viewable flow

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
swift
Domain
mobile-dev

Research direction

Read the linked original issue and trace the SignIn, SignInProcessA, and SignInProcessB Interactors, listeners, routers, and presentables mentioned here. A complete contribution would first need an agreed best-practices recommendation for propagating the error and handling detachment; no file or test is identified in this issue.

Written by the indexing model from the issue text.

Description

Original issue: https://github.com/uber/RIBs/issues/160

Let's suppose we have:

SignIn (viewable) -> SignInProcessA (not viewable) -> SignInProcessB (not viewable)

Supposing that in SignInProcessB Interactor we had an error, I have some questions:

  • It should call a method from it's listener i.e: self.listener?.hadErrorSigningIn(error) recursively until it arrives at SignIn (viewable) to use presentable like: self.presentable.present(error)?

  • If above answer is right, should I call something like:

    self.router.detach(animated: true) {
    self.listener?.hadErrorSigningIn(error)
    }
    in order to grant that everything was detached when it arrives at SignIn(viewable) ?

Thanks in advance...

Dominant language
Swift
Stars
193
Forks
23
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uber/RIBs-iOS

All issues in uber/RIBs-iOS

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.