-
Notifications
You must be signed in to change notification settings - Fork 301
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
Adding error boundary above App #475
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #475 +/- ##
=======================================
Coverage 29.85% 29.85%
=======================================
Files 10 10
Lines 1323 1323
=======================================
Hits 395 395
Misses 887 887
Partials 41 41 ☔ View full report in Codecov by Sentry. |
frontend/src/main.tsx
Outdated
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
<ErrorBoundary fallback={<div>Something went wrong</div>}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showing "Something went wrong" is not enough. We should display some error details, as well as suggestion to reload the page or start from the root of the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I talked to nir regarding what more to do in this pr, I will have an update later this week
I added the global error modal component as a fallback for the error boundary. For testing, I added this line into the
This an error thrown somewhere handled by the error boundary, if this is the case this is what you will see : As you can see, right now I rely on the Is there any consistent structure that I can use for errors ? Ps - Once we will have an error structure I will add prop type into the |
Changes Proposed
Check List
Added global error boundary