-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add unified ErrorHandler component #1697
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 unified ErrorHandler component #1697
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5002cbc to
dc253c8
Compare
0fa7ae0 to
b8f873e
Compare
dc253c8 to
9be3ab2
Compare
b8f873e to
2f5f3a3
Compare
9be3ab2 to
d2ad4cd
Compare
2f5f3a3 to
bedeb6d
Compare
|
|
||
| const handleRefresh = () => { | ||
| // Reset error boundary if available before reloading | ||
| resetErrorBoundary?.(); |
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.
What is this used for? seems like its only used in this file. lets remove it if we don't need it.
| if (onGoHome) { | ||
| onGoHome(); | ||
| } else { | ||
| window.location.href = "/"; | ||
| } |
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 wonder if we can just default onGoHome to be
onGoHome = () => window.location.href = "/";NIT: Do we rename this to something else? onGoToSafeURL or something
|
|
||
| if (config.enabled && error instanceof Error) { | ||
| Bugsnag.notify(error, (event) => { | ||
| event.addMetadata("error_handler", { |
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.
Do we remove this magic string?
bedeb6d to
2b4b0cd
Compare
d2ad4cd to
bedad4c
Compare
2b4b0cd to
7e226d9
Compare
bedad4c to
43e186c
Compare
Add ErrorHandler to unify error handling logic for both React Error Boundaries and Router errors. Automatically reports errors to Bugsnag and provides consistent error display with retry/go-home actions.
43e186c to
a8636d6
Compare
7e226d9 to
9322f42
Compare
|
Note: I am actively working on implementing a refactor to simplify the contents of this PR |
|
This branch is not needed and closed. |

Description
Created a unified
ErrorHandlercomponent to standardize error handling across the application. This component automatically reports errors to Bugsnag and provides consistent error display functionality for both React Error Boundaries and Router errors.The new component:
Updated
FullPageErrorto use the newErrorHandlercomponent instead of directly usingErrorDisplay.Type of Change
Checklist
Test Instructions