Skip to content

Commit

Permalink
docs: add reference to sentry issue 9514
Browse files Browse the repository at this point in the history
  • Loading branch information
zivl committed Nov 13, 2023
1 parent 677fbdf commit 23c622d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/error-boundary-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `@sentry/react` library exposes a `<Sentry.ErrorBoundary>` React component t
However, the `<Sentry.ErrorBoundary>` component causes Sentry to send multiple events due to the way it works under the hood. This is because it catches errors in the `componentDidCatch` lifecycle method, and then re-throws them, which causes Sentry to send another event. This is not a problem in production, but it can be a problem when testing.

## 3 Errors are sent to Sentry
When using `sentry-testkit` to test Sentry reports, the `testkit.reports()` call will return the following 3 total errors:
When using `sentry-testkit` to test Sentry reports, the `testkit.reports()` call will return the following 3 total errors, as explained in [Sentry's issue #9514](https://github.com/getsentry/sentry-javascript/issues/9514#issuecomment-1805723611):

1. The original error that is captured by the error boundary
2. The original error captured by global event listener. This only occurs in in dev mode, because error boundaries rethrow the errors that they catch and those errors bubble up to the global event listener where it is captured again.
Expand Down

0 comments on commit 23c622d

Please sign in to comment.