Skip to content

feat: Add ErrorBoundary and RouterError for better error UX (#1185)#1186

Merged
karilint merged 3 commits into
mainfrom
codex/1185-error-boundary
May 29, 2026
Merged

feat: Add ErrorBoundary and RouterError for better error UX (#1185)#1186
karilint merged 3 commits into
mainfrom
codex/1185-error-boundary

Conversation

@karilint
Copy link
Copy Markdown
Collaborator

Implement #1185: Provide ErrorBoundary and errorElement to catch and display application errors gracefully.

  • Add ErrorBoundary component to catch React component render errors
  • Add RouterError component to catch React Router v6 data router errors
  • Wrap RouterProvider with ErrorBoundary in main.tsx
  • Add errorElement to root route in router

This provides a better user experience when the application encounters errors, showing a user-friendly error page with options to reload or go back instead of the default React error screen.

Implement #1185: Provide ErrorBoundary and errorElement to catch and display
application errors gracefully.

- Add ErrorBoundary component to catch React component render errors
- Add RouterError component to catch React Router v6 data router errors
- Wrap RouterProvider with ErrorBoundary in main.tsx
- Add errorElement to root route in router

This provides a better user experience when the application encounters errors,
showing a user-friendly error page with options to reload or go back instead
of the default React error screen.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@karilint karilint marked this pull request as ready for review May 29, 2026 08:49
@karilint
Copy link
Copy Markdown
Collaborator Author

@copilot Please review this pull request.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

@copilot Please review this pull request.

I found one material issue: frontend/src/components/ErrorBoundary/ErrorBoundary.tsx currently renders the raw error text and stack trace to end users. That leaks internal implementation details in production, so the details section should be gated to development-only (or removed from the user-facing UI).

Security fix for PR #1186: ErrorBoundary was leaking internal implementation
details (stack traces, error messages) to end users in production.

- Gate error details section to development mode only using import.meta.env.DEV
- In production, only show generic error message and reload button
- Prevents information disclosure while maintaining debugging capability in dev

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@karilint
Copy link
Copy Markdown
Collaborator Author

@copilot Please review this pull request.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

@copilot Please review this pull request.

I reviewed the current diff and found one remaining material issue: frontend/src/components/ErrorBoundary/RouterError.tsx still shows the raw router error message in production. That can leak internal implementation details to end users and should be gated to development-only or replaced with a generic production message.

@karilint karilint merged commit 820b768 into main May 29, 2026
4 checks passed
@karilint karilint deleted the codex/1185-error-boundary branch May 29, 2026 12:47
@karilint karilint restored the codex/1185-error-boundary branch May 29, 2026 13:08
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.

2 participants