feat(routes): wrap Outlet in ErrorBoundary with recoverable fallback (MAPPS-318) #363

Merged
YousifShkara merged 1 commit from feat/MAPPS-318-route-error-boundary into main 2026-06-26 06:37:38 +02:00
Owner

A single route returning Err(...) (via ? or bail!) previously poisoned the AuthGuard's Outlet, leaving the user on a URL that did not render anything actionable. Wrap the Outlet in dioxus::ErrorBoundary with a centered RouteErrorFallback card that offers "Go to dashboard" (clears the boundary + navigates) and "Reload page" (window.location.reload). Debug builds also print the captured error in a code block so QA can paste it into bug reports.

The boundary does NOT catch wasm panics. dioxus-core 0.7 documents that CapturedPanic is unreachable on wasm because the runtime cannot unwind, so panic!() still aborts. The fix covers every error that flows through the Element = Result<VNode, RenderError> channel; panic recovery is parked until upstream wasm supports catching unwinds. Inline comment + ticket update flag the limitation explicitly.

#MAPPS-318

A single route returning `Err(...)` (via `?` or `bail!`) previously poisoned the AuthGuard's Outlet, leaving the user on a URL that did not render anything actionable. Wrap the Outlet in `dioxus::ErrorBoundary` with a centered `RouteErrorFallback` card that offers "Go to dashboard" (clears the boundary + navigates) and "Reload page" (window.location.reload). Debug builds also print the captured error in a code block so QA can paste it into bug reports. The boundary does NOT catch wasm panics. dioxus-core 0.7 documents that `CapturedPanic` is unreachable on wasm because the runtime cannot unwind, so `panic!()` still aborts. The fix covers every error that flows through the `Element = Result<VNode, RenderError>` channel; panic recovery is parked until upstream wasm supports catching unwinds. Inline comment + ticket update flag the limitation explicitly. #MAPPS-318
feat(routes): wrap Outlet in ErrorBoundary with recoverable fallback (MAPPS-318)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 12m3s
Create release / Create release from merged PR (pull_request) Has been skipped
c08209cfa8
A single route returning `Err(...)` (via `?` or `bail!`) previously poisoned the AuthGuard's Outlet, leaving the user on a URL that did not render anything actionable. Wrap the Outlet in `dioxus::ErrorBoundary` with a centered `RouteErrorFallback` card that offers "Go to dashboard" (clears the boundary + navigates) and "Reload page" (window.location.reload). Debug builds also print the captured error in a code block so QA can paste it into bug reports.

The boundary does NOT catch wasm panics. dioxus-core 0.7 documents that `CapturedPanic` is unreachable on wasm because the runtime cannot unwind, so `panic!()` still aborts. The fix covers every error that flows through the `Element = Result<VNode, RenderError>` channel; panic recovery is parked until upstream wasm supports catching unwinds. Inline comment + ticket update flag the limitation explicitly.

#MAPPS-318
YousifShkara deleted branch feat/MAPPS-318-route-error-boundary 2026-06-26 06:37:38 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!363
No description provided.