Skip to content

Commit

Permalink
fix: ignore connection timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Oct 6, 2024
1 parent c60aae6 commit 194c8a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Sentry from '@sentry/electron'
import { isString, includes, get, each, takeRight, split } from 'lodash'
import { isString, some, get, each, takeRight, split } from 'lodash'
import path from 'path'

interface InitOptions {
Expand Down Expand Up @@ -33,9 +33,8 @@ export const init = ({ build, paths }: InitOptions) => {
dsn: 'https://[email protected]/1250935',
beforeSend(event) {
if (
includes(
get(event, 'exception.mechanism.data.message'),
'React is running in production mode',
some(['React is running in production mode', ':17027'], (messageToIgnore) =>
get(event, 'exception.mechanism.data.message')?.includes(messageToIgnore),
)
) {
return null
Expand Down

0 comments on commit 194c8a8

Please sign in to comment.