Commit graph

4 commits

Author SHA1 Message Date
Matt Sykes
76b4c35d59 Prevent error redirect loops with beforeEach circuit breaker
This adds a circuit breaker for uncaught failures in beforeEach. The first failure still goes through the normal ERROR/RESTART recovery path; a second consecutive failure redirects to the static error page instead of looping.
- New before-each-error-recovery module tracks recovery attempts in sessionStorage (with an in-memory fallback).
- ERROR/RESTART routes skip normal guard logic so the counter can accumulate across bounce-backs.
- The counter clears only after a fully successful navigation.
- redirectToStaticErrorPage centralizes hard-error bailout: logs, clears poisoned sessionStorage keys (submittedState, heritage redirect count, recovery count, externalParameterState), then navigates to /fmg/static/error.
- The static error page RESTART flow clears the same sessionStorage keys so bad state does not re-enter the funnel.
- Session storage key strings are centralized in session-storage.js.
- Unit tests cover recovery counting, bailout clearing, and navigation fallbacks.
Expected impact: Stops repeated ERROR → RESTART → ERROR cycles (including corrupt submittedState JSON.parse failures and recurring automation errors in us-east-1/us-east-2) by bailing out to the static error page after one failed recovery attempt.
2026-06-10 15:48:29 -04:00
Matt Sykes
7c02499056 CASH-2521, CASH-2526 - Handle infinite loop and add logging 2026-04-07 16:14:34 -04:00
Scott Kiener
af9775aa3b CASH-462 | Prettier changes 2025-04-03 14:17:31 -04:00
Scott Kiener
43d1353e52 CASH-462 | Add constant for submittedState 2025-04-03 14:15:39 -04:00