-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use sentry api to filter out errors
- Loading branch information
1 parent
690c555
commit 977c84a
Showing
1 changed file
with
1 addition
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,8 @@ export const init = ({ build, paths }: InitOptions) => { | |
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1250935', | ||
ignoreErrors: ['React is running in production mode', ':17027'], | ||
beforeSend(event) { | ||
if ( | ||
some(['React is running in production mode', ':17027'], (messageToIgnore) => | ||
get(event, 'exception.mechanism.data.message')?.includes(messageToIgnore), | ||
) | ||
) { | ||
return null | ||
} | ||
|
||
each(get(event, 'exception.values'), (value) => { | ||
each(get(value, 'stacktrace.frames'), (frame) => { | ||
if (frame.filename) { | ||
|