- refactored logic of logging;
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
|
||||
const LOCAL_DEVELOPMENT = process.env.REACT_APP_LOCAL_DEVELOPMENT;
|
||||
import logMsgWithSentry from '../../helpers/logMsgWithSentry';
|
||||
|
||||
class ErrorBoundary extends Component {
|
||||
constructor(props) {
|
||||
@@ -14,16 +12,8 @@ class ErrorBoundary extends Component {
|
||||
|
||||
static getDerivedStateFromError(error) {
|
||||
try {
|
||||
if (LOCAL_DEVELOPMENT !== '1') {
|
||||
Sentry.init({
|
||||
dsn: "https://e7b2134f7d816f663bb83e51b106a694@o4508381921738752.ingest.de.sentry.io/4508381935501392",
|
||||
environment: process.env.NODE_ENV || "development"
|
||||
});
|
||||
|
||||
Sentry.captureException(error);
|
||||
}
|
||||
logMsgWithSentry('', 0, {}, error);
|
||||
} catch (err) {
|
||||
console.log('err')
|
||||
console.log(err);
|
||||
}
|
||||
return { builderError: true };
|
||||
|
||||
Reference in New Issue
Block a user