question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React error boundary errors are not actually sent

See original GitHub issue

Following 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:

  1. window.onerror is being called before the React error boundary is being called
  2. 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:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
adititipniscommented, Dec 22, 2020

@frehner can you elaborate on how did you fix this?

1reaction
frehnercommented, Apr 22, 2020

Things are looking good after cleaning some stuff up. I’ll close this for now; thanks for your help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found