Test(error): add empty-fallback checks and tests for root error boundaries#5376
Merged
Merged
Conversation
Aamod-Dev
approved these changes
Jun 12, 2026
Aamod-Dev
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution. I went through the changes and the overall approach looks good.
Contributor
|
🎉 Congratulations @diksha78dev! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
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.
Description
Fixes #4200
This PR adds empty-fallback checks and robust test coverage for the root-level error boundaries (
app/error.tsxandapp/global-error.tsx).Previously, receiving
null,undefined, or malformed error objects would cause a secondary crash inside the boundaries due to direct access toerror.message, preventing the styled error UI from rendering.Changes Made:
const errorMessage = error?.message || ''before passing it to console logs, clipboard text, or rendering.Linkimport warning inapp/global-error.tsx.app/error.empty-fallback.test.tsxandapp/global-error.empty-fallback.test.tsxto verify resilient boundary behavior under multiple malformed/missing error object shapes.Pillar
Visual Preview
(N/A — This is a codebase resilience and unit testing PR. No change is made to standard UI designs or visual layouts).
Checklist before requesting a review:
CONTRIBUTING.mdfile.npx vitest run app/error.empty-fallback.test.tsx app/global-error.empty-fallback.test.tsx).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.