Skip to content

Test(error): add empty-fallback checks and tests for root error boundaries#5376

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
diksha78dev:fix/issue-4200
Jun 12, 2026
Merged

Test(error): add empty-fallback checks and tests for root error boundaries#5376
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
diksha78dev:fix/issue-4200

Conversation

@diksha78dev

Copy link
Copy Markdown
Contributor

Description

Fixes #4200

This PR adds empty-fallback checks and robust test coverage for the root-level error boundaries (app/error.tsx and app/global-error.tsx).

Previously, receiving null, undefined, or malformed error objects would cause a secondary crash inside the boundaries due to direct access to error.message, preventing the styled error UI from rendering.

Changes Made:

  • Safely extracted the error message using const errorMessage = error?.message || '' before passing it to console logs, clipboard text, or rendering.
  • Cleaned up an unused Link import warning in app/global-error.tsx.
  • Created app/error.empty-fallback.test.tsx and app/global-error.empty-fallback.test.tsx to verify resilient boundary behavior under multiple malformed/missing error object shapes.

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

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:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (npx vitest run app/error.empty-fallback.test.tsx app/global-error.empty-fallback.test.tsx).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and PR support.

@Aamod-Dev Aamod-Dev added GSSoc26 GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements type:testing Adding, updating, or fixing tests mentor:Aamod007 and removed GSSoc26 labels Jun 12, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I went through the changes and the overall approach looks good.

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 12, 2026
@JhaSourav07 JhaSourav07 merged commit 92c86b1 into JhaSourav07:main Jun 12, 2026
12 checks passed
@github-actions

Copy link
Copy Markdown
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.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 12, 2026
@JhaSourav07 JhaSourav07 added gssoc:approved PR has been reviewed and accepted for valid contribution points and removed gssoc:approved PR has been reviewed and accepted for valid contribution points labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ApiNotifyRoute-empty-fallback): verify Edge Cases & Empty/Missing Inputs Verification (Variation 1)

3 participants