Skip to content

fix(reports): add scoped error boundary - #1239

Merged
mftee merged 1 commit into
CodeGirlsInc:mainfrom
Kandexa:feat/issue-1167-reports-error
Aug 26, 2026
Merged

fix(reports): add scoped error boundary#1239
mftee merged 1 commit into
CodeGirlsInc:mainfrom
Kandexa:feat/issue-1167-reports-error

Conversation

@Kandexa

@Kandexa Kandexa commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1166
Closes #1168
Closes #1169
Closes #1167

Adds the missing reports-level error boundary with a reports-specific retry action and dashboard navigation. This keeps a failed reports fetch within the reports segment instead of using the broader protected-layout fallback.

Why

The reports route had a loading boundary but no matching error boundary, so a reports-only data failure could surface through a generic protected-route error. A nested error.tsx uses the existing App Router boundary pattern and gives users a retry path local to the failed segment.

What was built

File What it contains
frontend/app/[locale]/(protected)/reports/error.tsx Client error boundary that logs the failure, invokes Next.js reset() for retry, and links back to the dashboard.
frontend/test-utils/reports-error.test.tsx Verifies reports-scoped messaging, retry behavior, and dashboard navigation.

Integration changes outside frontend/app/[locale]/(protected)/reports/

No existing production files modified; the route boundary and its test are additions only.

Acceptance criteria coverage

  • A failed reports data fetch shows a reports-scoped error state with a retry action (frontend/app/[locale]/(protected)/reports/error.tsx plus frontend/test-utils/reports-error.test.tsx — scoped heading and retry callback)

Deliberately deferred

None.

Test plan

  • npm test — not run per request
  • npm run typecheck — not run per request
  • npm run lint — not run per request
  • npm run build — not run per request
  • Formatter — not run per request

Env vars / Notes

No new environment variables or public API surfaces. The parent protected error boundary remains unchanged for failures outside the reports segment.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@Kandexa is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@Kandexa 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

@mftee mftee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No merge conflicts with main. Scoped error boundary for reports is a solid fix - approving.

@mftee
mftee merged commit 12ee655 into CodeGirlsInc:main Aug 26, 2026
0 of 6 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

2 participants