Skip to content

Commit

Permalink
feat: use sentry api to filter out errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Oct 30, 2024
1 parent 690c555 commit 977c84a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 977c84a

Please sign in to comment.