React error boundary errors are not actually sent
See original GitHub issueFollowing the docs here https://github.com/airbrake/airbrake-js/tree/master/packages/browser/examples/react
I tried adding params to the notify call but they never showed up in Airbrake. I then discovered that they aren’t sent in the network API call either. Further digging revealed the following:
window.onerror
is being called before the React error boundary is being called- When the error is caught by the error boundary, it tries to notify again. However, there is a filter built in called
makeDebounceFilter
that prevents the React error boundary error from actually being sent
So, it appears that you either need to turn off window.onerror
for React apps or find another way to report the errors caught by error boundaries?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Error Boundaries - React
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI...
Read more >React error handling with react-error-boundary - LogRocket Blog
Error boundaries were introduced in React 16 as a way to catch and handle JavaScript errors that occur in the UI parts of...
Read more >React Error Boundaries not working with React - Stack Overflow
You can't catch compile-time errors, the Error Boundaries are for run-time errors within the UI. Refer to Compile time vs run time errors....
Read more >Use react-error-boundary to handle errors in React
This is where the Error Boundary feature comes in to play. An "Error Boundary" is a special component that you write to handle...
Read more >Catching Errors in React with Error Boundaries
Error boundaries is the React way to handle errors in your application. It lets you react and recover from runtime errors as well...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@frehner can you elaborate on how did you fix this?
Things are looking good after cleaning some stuff up. I’ll close this for now; thanks for your help.