Opens the challenge a checkpoint error names, as screens of the process the
error interrupted: the first challenge screen comes over the screen in front
(or, when the launch itself was interrupted, is the only screen), and the
person's answers move through the challenge screens' actions, exactly as the
login and the two-factor screens do.
Catch the error once and open it — whichever request raised it, inside a
screen's action or the launch:
constprogram = (feed: StoredSessionFirstScreen) =>Effect.gen(function* () { // … a screen action of `feed` that the server interrupts with a challenge … }).pipe( Effect.catchTag('IgCheckpointError', error=> Effect.gen(function* () { constchallenge = yield*OpenChallenge(error); // `challenge` is a challenge screen (narrow by `challenge.id` or // `XxxScreen.is(challenge)`), or the challenge's end, narrowed the same // way: `ChallengeClosed.is(challenge)` / `ChallengeClosedBeforeLaunch.is(challenge)`. }), ), );
It sends what the app sends to read a challenge: the challenge state
(GET challenge/…) and, by its kind, the requests that tell which step it is
(a redirect's resolve, the UFAC controller, the web challenge's page).
Its answer is the sum every challenge step answers with: the step's screen,
ChallengeClosed (the challenge is already over: the screen below a
challenge screen that is open — the challenge screen itself when it is the
one on top, never as the interrupted screen — or the unchanged screen in
front), or ChallengeClosedBeforeLaunch (over, and no screen is
open). A step the library does not model is
ChallengeStepNotModelledError. The interrupted action is never
retried: the caller takes it again once the challenge is closed.
The error carries the process it was raised in, so no layer is provided: the
challenge runs on that process's services. An error the library did not
raise in an app process, or one kept past the scope that built the process
(its reference is closed with the scope and drops its services), dies
with ChallengeWithoutProcessError (a defect: the caller's misuse) and sends nothing. Like every handle,
the outcome must not be used after the scope that launched the process
closes.
Opens the challenge a checkpoint error names, as screens of the process the error interrupted: the first challenge screen comes over the screen in front (or, when the launch itself was interrupted, is the only screen), and the person's answers move through the challenge screens' actions, exactly as the login and the two-factor screens do.
Catch the error once and open it — whichever request raised it, inside a screen's action or the launch:
It sends what the app sends to read a challenge: the challenge state (
GET challenge/…) and, by its kind, the requests that tell which step it is (a redirect's resolve, the UFAC controller, the web challenge's page).Its answer is the sum every challenge step answers with: the step's screen, ChallengeClosed (the challenge is already over: the screen below a challenge screen that is open — the challenge screen itself when it is the one on top, never as the interrupted screen — or the unchanged screen in front), or ChallengeClosedBeforeLaunch (over, and no screen is open). A step the library does not model is ChallengeStepNotModelledError. The interrupted action is never retried: the caller takes it again once the challenge is closed.
The error carries the process it was raised in, so no layer is provided: the challenge runs on that process's services. An error the library did not raise in an app process, or one kept past the scope that built the process (its reference is closed with the scope and drops its services), dies with ChallengeWithoutProcessError (a defect: the caller's misuse) and sends nothing. Like every handle, the outcome must not be used after the scope that launched the process closes.