Skip to content

feat(frontend): route-segment error.tsx for claims, policies, and admin - #269

Merged
jhayniffy merged 2 commits into
InsurNiffy:mainfrom
AustineSamuel:error-boundary
Mar 29, 2026
Merged

feat(frontend): route-segment error.tsx for claims, policies, and admin#269
jhayniffy merged 2 commits into
InsurNiffy:mainfrom
AustineSamuel:error-boundary

Conversation

@AustineSamuel

@AustineSamuel AustineSamuel commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Closes #238


Adds and wires Next.js App Router segment error boundaries so a render failure in one area does not tear down the whole shell (nav, wallet, etc.).

Segments

/policies — new layout + page hosting PolicyDashboard; error.tsx for this subtree.
/claims — existing error.tsx updated to pass a segment key for logging.
/admin — new placeholder layout + page + error.tsx (robots already disallow /admin).
Recovery UX

Shared RouteError: contextual title, user-safe message (no stack in prod), Try again calling reset(), Go to dashboard ( /dashboard → /redirect to /policies).
Observability

logRouteSegmentError → Plausible route_segment_error with segment, error_name, optional digest only (no error.message, no stack to analytics).

@drips-wave

drips-wave Bot commented Mar 28, 2026

Copy link
Copy Markdown

@AustineSamuel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@jhayniffy
jhayniffy merged commit ba5c9ef into InsurNiffy:main Mar 29, 2026
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend — Error boundary per route segment: isolated failure containment

2 participants