Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Error page and ErrorBoundary #1827

Open
wants to merge 1 commit into
base: soul/main
Choose a base branch
from

Conversation

jordanarldt
Copy link

What/Why?

  • Use the Error component from VIBES
  • Modify existing error page to use this component
  • Add an ErrorBoundary in (default) route to maintain layout structure when error occurs

Testing

image

@jordanarldt jordanarldt requested a review from a team as a code owner December 31, 2024 20:07
Copy link

changeset-bot bot commented Dec 31, 2024

⚠️ No Changeset found

Latest commit: 02eced4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ❌ Failed (Inspect) 💬 Add feedback Jan 3, 2025 7:01pm
catalyst-soul ❌ Failed (Inspect) Jan 3, 2025 7:01pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jan 3, 2025 7:01pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jan 3, 2025 7:01pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jan 3, 2025 7:01pm

Copy link
Collaborator

@migueloller migueloller left a comment

Choose a reason for hiding this comment

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

Looks good. Do we have a way to test this?

core/app/[locale]/(default)/error.tsx Outdated Show resolved Hide resolved
@jordanarldt jordanarldt force-pushed the ja/add-error-page branch 2 times, most recently from 0d8ef37 to b770b9e Compare December 31, 2024 22:07
@jordanarldt
Copy link
Author

Looks good. Do we have a way to test this?

@migueloller I tested on my sandbox store, since my category pages are still returning 500 errors due to that weird nuqs error when I have no product filters 👍 That's how I got the screenshots.

If we were to make functional tests for this behavior though, not entirely sure how we'd go about testing - we'd have to force an internal error.

@migueloller
Copy link
Collaborator

Looks good. Do we have a way to test this?

@migueloller I tested on my sandbox store, since my category pages are still returning 500 errors due to that weird nuqs error when I have no product filters 👍 That's how I got the screenshots.

If we were to make functional tests for this behavior though, not entirely sure how we'd go about testing - we'd have to force an internal error.

We should be able to do this by passing a streamable prop that throws whenever we implement the test

@jordanarldt
Copy link
Author

We should be able to do this by passing a streamable prop that throws whenever we implement the test

@migueloller Yeah, that's what I had in mind also. For a functional / E2E test though, not sure how we'd force the error there 💭

Copy link
Contributor

@jorgemoya jorgemoya left a comment

Choose a reason for hiding this comment

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

LGTM. Having two error boundaries makes sense, even though we duplicate code, which seems off.

core/app/[locale]/error.tsx Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-j00f6pyzu-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟢 Performance 99
🟢 Accessibility 92
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟠 Performance 88
🟢 Accessibility 92
🟢 Best practices 100
🟠 SEO 85

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.

3 participants