refactor: report errors to Bugsnag when using error boundary (ErrorPage fallback)#1696
Merged
morgan-wowk merged 1 commit intomasterfrom Feb 5, 2026
Merged
Conversation
4 tasks
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jan 26, 2026
5002cbc to
dc253c8
Compare
319066c to
80defd3
Compare
dc253c8 to
9be3ab2
Compare
9688389 to
c3cfc88
Compare
9be3ab2 to
d2ad4cd
Compare
c3cfc88 to
6cf38f9
Compare
d2ad4cd to
bedad4c
Compare
6cf38f9 to
ad2ef91
Compare
bedad4c to
43e186c
Compare
43e186c to
a8636d6
Compare
ad2ef91 to
62bc345
Compare
Author
|
Note: I am actively working on implementing a refactor to simplify the contents of this PR |
9322f42 to
43d5e44
Compare
62bc345 to
58af5dc
Compare
43d5e44 to
dcab8f2
Compare
ca3c44a to
f7acc67
Compare
5bcb71f to
15c6748
Compare
15c6748 to
61c8e8c
Compare
0dcd36d to
c7d466b
Compare
61c8e8c to
7c245df
Compare
c7d466b to
54c9881
Compare
70faa8f to
962f3c9
Compare
54c9881 to
b717d56
Compare
Mbeaulne
requested changes
Feb 5, 2026
Collaborator
Mbeaulne
left a comment
There was a problem hiding this comment.
some smallish changes but looks good!
src/components/shared/ErrorPage.tsx
Outdated
|
|
||
| useEffect(() => { | ||
| if (isBugsnagEnabled() && error instanceof Error) { | ||
| Bugsnag.notify(error, (event) => { |
src/components/shared/ErrorPage.tsx
Outdated
| useEffect(() => { | ||
| if (isBugsnagEnabled() && error instanceof Error) { | ||
| Bugsnag.notify(error, (event) => { | ||
| event.addMetadata("error_handler", { |
Collaborator
There was a problem hiding this comment.
Do we have a constant for error_handler?
src/components/shared/ErrorPage.tsx
Outdated
| }, [error]); | ||
|
|
||
| const handleRefresh = () => { | ||
| reset?.(); |
Collaborator
There was a problem hiding this comment.
NIT: instead of reset?.(); can we just write reset() and in the function signature add a default value to reset?
reset = () =>{}
Author
There was a problem hiding this comment.
I took your recommendation and added a default value
|
|
||
| const GENERIC_ERROR_CLASS = "Error"; | ||
|
|
||
| export const isBugsnagEnabled = (): boolean => Boolean(BUGSNAG_API_KEY); |
Collaborator
There was a problem hiding this comment.
I think this could be written like:
export const IS_BUGSNAG_ENABLED = Boolean(BUGSNAG_API_KEY);b717d56 to
e31158e
Compare
962f3c9 to
5301a3c
Compare
Mbeaulne
approved these changes
Feb 5, 2026
7560f78 to
2671a92
Compare
cebab76 to
fcc5dcb
Compare
2671a92 to
95adc7b
Compare
95adc7b to
b333d3b
Compare
fcc5dcb to
22efe5e
Compare
22efe5e to
fbedc98
Compare
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Note: Some of these changes are in preparation for work that is upstack. We wouldn't normally do this but don't wish to change it at this point.
Enhanced error handling by moving
ErrorPagefrom routes to shared components and adding Bugsnag integration. The component now automatically reports errors to Bugsnag when configured and includes the current pathname as metadata. Added support for error boundary reset functionality, allowing the component to properly reset when used with React error boundaries. Improved error message handling to better display different error types.Type of Change
Checklist
Test Instructions