@@ -18,7 +18,6 @@ import { matchPath, Link, Route, RouteComponentProps, Switch } from "react-route
18
18
import { ModalContainer } from "react-router-modal" ;
19
19
import { History } from "history" ;
20
20
import classNames from "classnames" ;
21
- import { captureException , withScope } from "@sentry/browser" ;
22
21
import { Address } from "@daostack/arc.js" ;
23
22
import { sortedNotifications } from "@store/notifications/notifications" ;
24
23
import * as css from "./App.scss" ;
@@ -80,7 +79,6 @@ type IProps = IExternalProps & IStateProps & IDispatchProps;
80
79
81
80
interface IState {
82
81
error : Error ;
83
- sentryEventId : string ;
84
82
}
85
83
86
84
class AppContainer extends React . Component < IProps , IState > {
@@ -92,24 +90,15 @@ class AppContainer extends React.Component<IProps, IState> {
92
90
super ( props ) ;
93
91
this . state = {
94
92
error : null ,
95
- sentryEventId : null ,
96
93
} ;
97
94
}
98
95
99
96
private showSimpleMessage = ( options : ISimpleMessagePopupProps ) : void => {
100
97
this . props . showSimpleMessage ( options ) ;
101
98
}
102
99
103
- public componentDidCatch ( error : Error , errorInfo : any ) : void {
100
+ public componentDidCatch ( error : Error ) : void {
104
101
this . setState ( { error } ) ;
105
-
106
- if ( process . env . NODE_ENV === "production" ) {
107
- withScope ( ( scope ) : void => {
108
- scope . setExtras ( errorInfo ) ;
109
- const sentryEventId = captureException ( error ) ;
110
- this . setState ( { sentryEventId } ) ;
111
- } ) ;
112
- }
113
102
}
114
103
115
104
public async componentDidMount ( ) : Promise < void > {
@@ -180,7 +169,7 @@ class AppContainer extends React.Component<IProps, IState> {
180
169
}
181
170
182
171
private clearError = ( ) => {
183
- this . setState ( { error : null , sentryEventId : null } ) ;
172
+ this . setState ( { error : null } ) ;
184
173
}
185
174
186
175
private dismissNotif = ( id : string ) => ( ) => this . props . dismissNotification ( id ) ;
@@ -224,7 +213,7 @@ class AppContainer extends React.Component<IProps, IState> {
224
213
// eslint-disable-next-line no-console
225
214
console . error ( this . state . error ) ;
226
215
return < div >
227
- < ErrorUncaught errorMessage = { this . state . error . message } sentryEventId = { this . state . sentryEventId } goHome = { this . clearError } > </ ErrorUncaught >
216
+ < ErrorUncaught errorMessage = { this . state . error . message } goHome = { this . clearError } > </ ErrorUncaught >
228
217
</ div > ;
229
218
} else {
230
219
const hasAcceptedCookies = ! ! localStorage . getItem ( AppContainer . hasAcceptedCookiesKey ) ;
0 commit comments