Skip to content

Commit 977c84a

Browse files
committed
feat: use sentry api to filter out errors
1 parent 690c555 commit 977c84a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/sentry.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,8 @@ export const init = ({ build, paths }: InitOptions) => {
3131

3232
Sentry.init({
3333
dsn: 'https://5e47d6b6bdb5f3b9979a59d9f01c5fca@o171991.ingest.us.sentry.io/1250935',
34+
ignoreErrors: ['React is running in production mode', ':17027'],
3435
beforeSend(event) {
35-
if (
36-
some(['React is running in production mode', ':17027'], (messageToIgnore) =>
37-
get(event, 'exception.mechanism.data.message')?.includes(messageToIgnore),
38-
)
39-
) {
40-
return null
41-
}
42-
4336
each(get(event, 'exception.values'), (value) => {
4437
each(get(value, 'stacktrace.frames'), (frame) => {
4538
if (frame.filename) {

0 commit comments

Comments
 (0)