Skip to content

reliability: Implement global ErrorBoundary and centralized error reporting (fix #171) - #674

Open
Ayinkx wants to merge 1 commit into
Stellabill:mainfrom
Ayinkx:fix/issue-171-error-handling
Open

reliability: Implement global ErrorBoundary and centralized error reporting (fix #171)#674
Ayinkx wants to merge 1 commit into
Stellabill:mainfrom
Ayinkx:fix/issue-171-error-handling

Conversation

@Ayinkx

@Ayinkx Ayinkx commented Aug 15, 2026

Copy link
Copy Markdown

Summary:

  • Add a global ErrorBoundary component (src/components/ErrorBoundary.tsx) that displays a user-friendly error UI with Refresh and Go Home actions.
  • Add a centralized ErrorHandler (src/lib/errorHandler.ts) which reports errors to /api/monitoring and logs them locally.
  • Add a useErrorHandler hook (src/hooks/useErrorHandler.ts) to standardize reporting and surface non-critical errors to users.
  • Integrate reporting from the API client (src/api/client.ts) to send errors to monitoring (fire-and-forget) when requests fail.
  • Wrap the top-level app with the ErrorBoundary in src/App.tsx so uncaught render errors are captured.

Notes:

  • The branch was created from upstream/main as requested and changes were pushed to the fork branch Ayinkx:fix/issue-171-error-handling.
  • Local type-checking revealed many pre-existing TypeScript/JSX errors outside the scope of this change; those are not introduced by this patch. CI should run full verification and surface any remaining issues.

Testing suggestions:

  1. Run the app and trigger an error inside a component (throw in render) to verify the ErrorBoundary UI appears.
  2. Simulate API failures using the existing query params (e.g., ?simulate_error or ?simulate_offline) and confirm ErrorHandler reports to /api/monitoring and that non-critical errors surface as alerts/toasts.
  3. Review the PR diff for scope and provide guidance about integrating with the app's notification/toast system or adding route-level boundaries.

If you prefer, I can add route-level boundaries and integrate with the in-app notification system in a follow-up PR.

…tellabill#171)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant