Feature/standardise error boundaries completed - #346
Merged
El-swaggerito merged 2 commits intoJul 29, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #337
Summary
This PR standardizes the dashboard error boundaries and fallback states, ensuring consistent error handling across the application while preventing sensitive error leaks in production environments.
Current Behaviour
Errors may surface inconsistently across routes, API calls, forms, and components. Raw sensitive errors were exposed unconditionally in the
ErrorBoundarycomponent.Expected Behaviour
The dashboard should use consistent error boundaries and safe fallback UI. Raw error messages and stack traces should only be visible in the development environment.
Changes
src/components/ErrorBoundary.tsxand usages across the application.ErrorBoundarytosrc/components/errors/ErrorBoundary.tsx.ErrorBoundaryto suppress raw stack traces in production (only displaying a Diagnostic ID).SectionErrorBoundaryinsrc/components/errors/SectionErrorBoundary.tsxfor component-level, non-intrusive fallback UIs.dashboard.tsx,analytics.tsx,profile.tsx) inSectionErrorBoundaryto prevent full page crashes when a section fails.tests/e2e/error-boundaries.spec.ts.docs/error-handling.mdto document the error boundary patterns and usage guidelines.Verification
NODE_ENVis not development.