From 96f97440123a645f17e52dee7225bb24e62b0dc1 Mon Sep 17 00:00:00 2001 From: Ziv Levy Date: Mon, 13 Nov 2023 20:58:53 +0200 Subject: [PATCH] docs: add reference to sentry issue 9514 --- website/docs/error-boundary-usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/error-boundary-usage.md b/website/docs/error-boundary-usage.md index 2d907d3..6223e84 100644 --- a/website/docs/error-boundary-usage.md +++ b/website/docs/error-boundary-usage.md @@ -11,7 +11,7 @@ The `@sentry/react` library exposes a `` React component t However, the `` 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.