feat(frontend): add ErrorBoundary component to prevent full-app crashes#275
Merged
MoeidHeidari merged 2 commits intoJun 13, 2026
Conversation
3580968 to
a4b7084
Compare
Collaborator
|
hi @bhavyamsharmaa, that is a nice catch. thanks for the contribution. Can you also provide a screenshot of the error so that everyone knows what it is about? |
de60ff2 to
19ce8a5
Compare
Signed-off-by: Bhavyam Sharma <positionbhavyamsharma@gmail.com>
19ce8a5 to
7ddd053
Compare
Collaborator
|
nice @bhavyamsharmaa . By screenshot I ment just add it here in the discussion we dont need to have it in the source code. It is fine for me. Please remove it in the source code and I can merge this PR. |
Author
|
@MoeidHeidari done, removed the screenshot from the source code. |
Screenshots do not belong in the repository assets; they were requested to be shared in the PR discussion only. Signed-off-by: Bhavyam Sharma <positionbhavyamsharma@gmail.com>
9e1bff4 to
66573ca
Compare
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.
Summary
ErrorBoundaryclass component insrc/presentation/components/common/ErrorBoundary.jsx<Routes>inApp.jsxwith<ErrorBoundary>so any render-time exception is caught app-wideWhy
React does not catch render-time exceptions with try/catch — only an Error Boundary (class component with
getDerivedStateFromError) can do that. Without this, any unhandled render error causes a blank white screen with no recovery path. With the boundary in place, users see a proper error screen and can reload instead of being stuck on a blank page.Test plan
npm run buildpasses with no errorsCloses #274
Screenshot
Before (no ErrorBoundary) — blank white screen:

After (with ErrorBoundary) — fallback UI with reload option:
