Skip to content

Conversation

@olavoparno
Copy link
Contributor

@olavoparno olavoparno commented Dec 11, 2024

closes https://github.com/Stand-With-Crypto/swc-internal/issues/302

fixes

What changed? Why?

  • add more granularity in terms of errors on our application with error boundaries
  • we've added it to the following parts of the app:
  1. Donate button
  2. Sign in button dialog
  3. Actions
  4. Map

PlanetScale deploy request

Notes to reviewers

How has it been tested?

  • Locally
  • Vercel Preview Branch
  • Unit test
  • Functional test

@vercel
Copy link

vercel bot commented Dec 11, 2024

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

Name Status Preview Updated (UTC)
swc-web ✅ Ready (Inspect) Visit Preview Dec 12, 2024 6:06pm

Copy link
Contributor

@eduardopicolo-cb eduardopicolo-cb left a comment

Choose a reason for hiding this comment

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

We also need to add the boundary to the actions deeplinks

@eduardopicolo-cb
Copy link
Contributor

There is also a new zod plugin for sentry getsentry/sentry-javascript#11144, this should allow for better grouping for validation related errors

And this integration that should add more error data from third-party errors https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/extraerrordata/

@olavoparno
Copy link
Contributor Author

There is also a new zod plugin for sentry getsentry/sentry-javascript#11144, this should allow for better grouping for validation related errors

And this integration that should add more error data from third-party errors https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/extraerrordata/

we already have Sentry.extraErrorDataIntegration() in place

scope.setExtras(extras)
}

scope.setLevel(severityLevel ?? 'warning')
Copy link
Contributor

Choose a reason for hiding this comment

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

Default should be error here, same as not setting it at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. adjusted it


return scope
}}
fallback={fallback ?? ErrorFallbackComponent}
Copy link
Contributor

Choose a reason for hiding this comment

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

The idea is to not have a fallback, this would create weird UI in some cases and is explicitly not the idea of that TDD, we don't want to change behavior or how we treat errors, all we want to do here is add metadata to the generic ones that are gonna be captured automatically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool, you're right. removed it

import { NextImage } from '@/components/ui/image'
import { PageTitle } from '@/components/ui/pageTitleText'

export function ErrorFallbackComponent() {
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment bellow, but we shouldn't have this here

@olavoparno olavoparno merged commit 8594400 into main Dec 12, 2024
3 checks passed
@olavoparno olavoparno deleted the feat/sentry-error-boundary branch December 12, 2024 20:39
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.

4 participants