16
16
17
17
import React from 'react'
18
18
import ReactDOM from 'react-dom'
19
+ import { BrowserRouter } from 'react-router-dom'
19
20
import * as Sentry from '@sentry/browser'
20
21
import { CaptureConsole } from '@sentry/integrations'
21
- import { BrowserRouter } from 'react-router-dom'
22
22
import { BrowserTracing } from '@sentry/tracing'
23
+
23
24
import {
25
+ customEnv ,
24
26
OverrideMergeStrategyType ,
27
+ QueryClientProvider ,
28
+ ThemeProvider ,
25
29
ToastManagerContainer ,
26
30
UseRegisterShortcutProvider ,
27
31
UserEmailProvider ,
28
- customEnv ,
29
- ThemeProvider ,
30
- ConfirmationModalProvider ,
31
- BaseConfirmationModal ,
32
- QueryClientProvider ,
33
32
} from '@devtron-labs/devtron-fe-common-lib'
33
+
34
34
import App from './App'
35
35
36
36
declare global {
@@ -60,7 +60,7 @@ if (import.meta.env.VITE_NODE_ENV === 'production' && window._env_ && window._en
60
60
}
61
61
62
62
Sentry . init ( {
63
- beforeBreadcrumb ( breadcrumb , hint ) {
63
+ beforeBreadcrumb ( breadcrumb ) {
64
64
if ( breadcrumb . category === 'console' ) {
65
65
if ( breadcrumb . level === 'warning' ) {
66
66
return null
@@ -83,19 +83,19 @@ if (import.meta.env.VITE_NODE_ENV === 'production' && window._env_ && window._en
83
83
const error = errorList [ index ]
84
84
if (
85
85
error &&
86
- ( ( error [ ' type' ] &&
87
- ( error [ ' type' ] === '[401]' ||
88
- error [ ' type' ] === '[403]' ||
89
- error [ ' type' ] === '[504]' ||
90
- error [ ' type' ] === '[503]' ||
91
- error [ ' type' ] === 'ChunkLoadError' ) ) ||
92
- ( error [ ' value' ] &&
93
- ( error [ ' value' ] . includes ( 'write data discarded, use flow control to avoid losing data' ) ||
94
- error [ ' value' ] . includes ( 'Failed to update a ServiceWorker' ) ||
95
- ( error [ ' value' ] . includes ( 'ServiceWorker script at ' ) &&
96
- error [ ' value' ] . includes ( 'encountered an error during installation.' ) ) ||
97
- error [ ' value' ] . includes ( 'Loading CSS chunk' ) ||
98
- error [ ' value' ] . includes ( `Unexpected token '<'` ) ) ) )
86
+ ( ( error . type &&
87
+ ( error . type === '[401]' ||
88
+ error . type === '[403]' ||
89
+ error . type === '[504]' ||
90
+ error . type === '[503]' ||
91
+ error . type === 'ChunkLoadError' ) ) ||
92
+ ( error . value &&
93
+ ( error . value . includes ( 'write data discarded, use flow control to avoid losing data' ) ||
94
+ error . value . includes ( 'Failed to update a ServiceWorker' ) ||
95
+ ( error . value . includes ( 'ServiceWorker script at ' ) &&
96
+ error . value . includes ( 'encountered an error during installation.' ) ) ||
97
+ error . value . includes ( 'Loading CSS chunk' ) ||
98
+ error . value . includes ( `Unexpected token '<'` ) ) ) )
99
99
) {
100
100
return null
101
101
}
0 commit comments