Skip to content

Commit

Permalink
Add common error filtering to sentry config
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcunha committed Jun 21, 2023
1 parent 13381ce commit 8e96cd1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,23 @@ Sentry.init({
levels: ['error'],
}),
],
ignoreErrors: ['User rejected the request'],
beforeSend(event) {
try {
//Ignore errors from chrome extension
if (
event.exception?.values &&
event.exception.values[0].stacktrace &&
event.exception.values[0].stacktrace.frames &&
event.exception.values[0].stacktrace.frames[0].filename &&
event.exception.values[0].stacktrace.frames[0].filename.includes(
'app://inject'
)
) {
return null
}
} catch (e) {}

return event
},
})

1 comment on commit 8e96cd1

@vercel
Copy link

@vercel vercel bot commented on 8e96cd1 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

artblocks-v2 – ./

artblocks-v2.vercel.app
artblocks-v2-git-main-unevenlabs.vercel.app
artblocks-v2-unevenlabs.vercel.app

Please sign in to comment.