-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add error page #75
Add error page #75
Conversation
You have my blessing for sentry 😁 |
I've gone down a huge rabbit hole trying to implement Sentry. It would be good for both of us to take a look at it together. I've push a I did run Some helpful links: https://docs.sentry.io/platforms/javascript/guides/electron/ This comment makes me think that we should just wait until v3 final of @sentry/electron is released. |
183c163
to
0853da9
Compare
Co-authored-by: steveoh <sgourley@utah.gov>
8c88655
to
2f9a6d6
Compare
Closes #72
This PR adds an error boundary component at the root of the application to catch any errors that aren't caught elsewhere in the application. Note: this will not catch errors in async code or event handlers.
You can test it by introducing some sort of code that will throw an uncaught exception on any page. Here's how I tested it in
src/pages/Data.jsx
:This is what the error page looks like:
"RESTART APPLICATION" exits and restarts the application automatically to hopefully get it back into a state that is workable.
"REPORT THIS ISSUE" opens the user's browser to the new issue page for this repo with a bunch of stuff automatically populated. Here's an example of an issue that I created with this button without entering anything manually into the description.
We probably want to set up some sort of crash reporting as well. Sentry would be my first choice since I'm already using it for the roadkill and fleet mobile apps. However, I didn't want to make this decision without @steveoh's blessing.