diff --git a/packages/bruno-app/src/pages/ErrorBoundary/index.js b/packages/bruno-app/src/pages/ErrorBoundary/index.js index 3da54913b..7a50ce29f 100644 --- a/packages/bruno-app/src/pages/ErrorBoundary/index.js +++ b/packages/bruno-app/src/pages/ErrorBoundary/index.js @@ -39,15 +39,18 @@ class ErrorBoundary extends React.Component { render() { if (this.state.hasError) { + const { error, errorInfo } = this.state; + const stackTrace = error?.stack || errorInfo?.componentStack || 'No stack trace available'; + return ( -
-
-
- +
+
+
+

Oops! Something went wrong

-

+

If you are using an official production build: the above error is most likely a bug!
Please report this under: @@ -60,41 +63,59 @@ class ErrorBoundary extends React.Component {

- - -
- - { - e.preventDefault(); - try { - if (this.state.clearCaches) { - await this.clearCache(); - } - } finally { - this.forceQuit(); - } - }} +
+ + +
+
+ or +
+
+ +
+ + { + e.preventDefault(); + try { + if (this.state.clearCaches) { + await this.clearCache(); + } + } finally { + this.forceQuit(); + } + }} + > + Force Quit + +
+ +
+

Stack Trace

+ {error?.message && ( +

{error.message}

+ )} +
+              {stackTrace}
+            
+
); }