diff --git a/desktop/flipper-ui-core/src/ui/components/ErrorBoundary.tsx b/desktop/flipper-ui-core/src/ui/components/ErrorBoundary.tsx index 95c7b9f1e..11fea18b6 100644 --- a/desktop/flipper-ui-core/src/ui/components/ErrorBoundary.tsx +++ b/desktop/flipper-ui-core/src/ui/components/ErrorBoundary.tsx @@ -55,7 +55,8 @@ export default class ErrorBoundary extends Component< } componentDidCatch(err: Error, errorInfo: ErrorInfo) { - console.error(err.toString(), errorInfo.componentStack, 'ErrorBoundary'); + // eslint-disable-next-line flipper/no-console-error-without-context + console.error(err, errorInfo.componentStack, 'ErrorBoundary'); this.setState({error: err}); } @@ -78,11 +79,9 @@ export default class ErrorBoundary extends Component< return ( {heading} - {this.props.showStack !== false && ( - {`${ - error.stack ?? error.toString() - }`} - )} + {this.props.showStack !== false && + 'Look in the console for correct stack traces.'} +
);