Skip to content

Commit 9e08551

Browse files
authored
docs: Add warning about react errors and default ignores (#840)
1 parent 2b8e23b commit 9e08551

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/collections/_documentation/platforms/javascript/default-integrations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ _Import name: `Sentry.Integrations.InboundFilter`_
2727

2828
This integration allows developers to ignore specific errors based on the type or message,
2929
as well as blacklist/whitelist urls which exception originates from.
30+
It ignores errors, which message starts with `Script error` or `Javascript error: Script error` by default.
31+
More on this in our ["What the heck is "Script error"?"](https://blog.sentry.io/2016/05/17/what-is-script-error) blog post.
3032

3133
To configure it, use `ignoreErrors`, `blacklistUrls` and `whitelistUrls` SDK options directly.
3234

src/collections/_documentation/platforms/javascript/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ This integration deduplicates certain events. The Sentry SDK enables this by def
793793
_Import name: `Sentry.Integrations.InboundFilter`_
794794

795795
This integration allows developers to ignore specific errors based on the type or message, as well as blacklist/whitelist URLs that originate from the exception.
796+
It ignores errors, which message starts with `Script error` or `Javascript error: Script error` by default. More on this in our ["What the heck is "Script error"?"](https://blog.sentry.io/2016/05/17/what-is-script-error) blog post.
796797

797798
To configure it, use `ignoreErrors`, `blacklistUrls`, and `whitelistUrls` SDK options directly.
798799

src/collections/_documentation/platforms/javascript/react.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ On its own, `@sentry/browser` will report any uncaught exceptions triggered from
88

99
If you’re using React 16 or above, Error Boundaries are an important tool for defining the behavior of your application in the face of errors. Be sure to send errors they catch to Sentry using `Sentry.captureException`, and optionally this is also a great opportunity to surface User Feedback
1010

11+
{% capture __alert_content -%}
12+
One important thing to note about the behavior of error boundaries in development mode is that React will rethrow errors they catch. This will result in errors being reported twice to Sentry with the above setup, but this won’t occur in your production build.
13+
{%- endcapture -%}
14+
{%- include components/alert.html
15+
title="Note"
16+
content=__alert_content
17+
level="info"
18+
%}
19+
1120
```jsx
1221
import * as Sentry from '@sentry/browser';
1322

0 commit comments

Comments
 (0)