about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/error_boundary.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/components/error_boundary.js')
-rw-r--r--app/javascript/flavours/glitch/components/error_boundary.js22
1 files changed, 2 insertions, 20 deletions
diff --git a/app/javascript/flavours/glitch/components/error_boundary.js b/app/javascript/flavours/glitch/components/error_boundary.js
index 8998802b1..62950a7d3 100644
--- a/app/javascript/flavours/glitch/components/error_boundary.js
+++ b/app/javascript/flavours/glitch/components/error_boundary.js
@@ -2,7 +2,6 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import { FormattedMessage } from 'react-intl';
 import { preferencesLink } from 'flavours/glitch/util/backend_links';
-import StackTrace from 'stacktrace-js';
 
 export default class ErrorBoundary extends React.PureComponent {
 
@@ -12,29 +11,15 @@ export default class ErrorBoundary extends React.PureComponent {
 
   state = {
     hasError: false,
-    errorMessage: undefined,
     stackTrace: undefined,
-    mappedStackTrace: undefined,
     componentStack: undefined,
   }
 
   componentDidCatch(error, info) {
     this.setState({
       hasError: true,
-      errorMessage: error.toString(),
       stackTrace: error.stack,
       componentStack: info && info.componentStack,
-      mappedStackTrace: undefined,
-    });
-
-    StackTrace.fromError(error).then((stackframes) => {
-      this.setState({
-        mappedStackTrace: stackframes.map((sf) => sf.toString()).join('\n'),
-      });
-    }).catch(() => {
-      this.setState({
-        mappedStackTrace: undefined,
-      });
     });
   }
 
@@ -44,16 +29,13 @@ export default class ErrorBoundary extends React.PureComponent {
   }
 
   render() {
-    const { hasError, errorMessage, stackTrace, mappedStackTrace, componentStack } = this.state;
+    const { hasError, stackTrace, componentStack } = this.state;
 
     if (!hasError) return this.props.children;
 
     let debugInfo = '';
     if (stackTrace) {
-      debugInfo += 'Stack trace\n-----------\n\n```\n' + errorMessage + '\n' + stackTrace.toString() + '\n```';
-    }
-    if (mappedStackTrace) {
-      debugInfo += 'Mapped stack trace\n-----------\n\n```\n' + errorMessage + '\n' + mappedStackTrace.toString() + '\n```';
+      debugInfo += 'Stack trace\n-----------\n\n```\n' + stackTrace.toString() + '\n```';
     }
     if (componentStack) {
       if (debugInfo) {