Skip to content

Commit 4ceb796

Browse files
author
Gregor Gololicic
committed
use init opts
1 parent 35209fa commit 4ceb796

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/index.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,8 @@ Sentry.init({
1010
integrations: [
1111
new BrowserTracing()
1212
],
13+
ignoreErrors: [/GraphQL/i, /Failed to fetch/i],
1314
tracesSampleRate: 1.0,
14-
beforeSend(event, hint) {
15-
const error = hint.originalException;
16-
17-
const ignoreErrors = [
18-
/GraphQL/i, // filter out graphql errors
19-
/Failed to fetch/i // filter out failed to fetch network errors
20-
]
21-
22-
// filter out blacklisted errors
23-
if (error && error.message) {
24-
for (const filter of ignoreErrors) {
25-
if (error.message.match(filter)) {
26-
return null
27-
}
28-
}
29-
}
30-
31-
return event;
32-
},
3315
});
3416

3517
const root = document.getElementById('root');

0 commit comments

Comments
 (0)