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

fix error boundary #3389

Merged
merged 1 commit into from
Mar 27, 2023
Merged

fix error boundary #3389

merged 1 commit into from
Mar 27, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Mar 27, 2023

About the changes

Move plausible available for the error boundary.

Previously:

  • plausible provider was much deeper than the error boundary so the error handler didn't get access to the tracker

After:

  • error boundary moved below the plausible provider
  • another error boundary added for the plausible provider itself

This is just a few LOC but the formatting kicked in

Important files

Discussion points

@vercel
Copy link

vercel bot commented Mar 27, 2023

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

Name Status Preview Comments Updated
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 27, 2023 at 10:30AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
unleash-docs ⬜️ Ignored (Inspect) Mar 27, 2023 at 10:30AM (UTC)

<Routes>
{availableRoutes.map(route => (
<PlausibleProvider>
<ErrorBoundary FallbackComponent={Error}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will catch all the unhandled errors except from the plausible errors

@@ -48,61 +48,67 @@ export const App = () => {

return (
<ErrorBoundary FallbackComponent={Error}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is to handle plausible errors from the plausible provider

Copy link
Member

@nunogois nunogois left a comment

Choose a reason for hiding this comment

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

LGTM

@kwasniew kwasniew merged commit a1535ae into main Mar 27, 2023
@kwasniew kwasniew deleted the fix-error-tracking branch March 27, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants