Skip to content

Commit 194c8a8

Browse files
committed
fix: ignore connection timeout
1 parent c60aae6 commit 194c8a8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/sentry.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Sentry from '@sentry/electron'
2-
import { isString, includes, get, each, takeRight, split } from 'lodash'
2+
import { isString, some, get, each, takeRight, split } from 'lodash'
33
import path from 'path'
44

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

0 commit comments

Comments
 (0)