mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
Enhance ErrorBoundary component with stacktrace + version info
This commit is contained in:
parent
63dfdebf6a
commit
37b6dff94b
|
@ -22,8 +22,16 @@ export class ErrorBoundary extends React.Component<{}, { error?: Error }> {
|
|||
if (this.state.error) {
|
||||
return (
|
||||
<ErrorWrapper>
|
||||
<h1>Something went wrong.</h1>
|
||||
<h1>Something went wrong...</h1>
|
||||
<small> {this.state.error.message} </small>
|
||||
<p>
|
||||
<details>
|
||||
<summary>Stack trace</summary>
|
||||
<pre>{this.state.error.stack}</pre>
|
||||
</details>
|
||||
</p>
|
||||
<small> ReDoc Version: {__REDOC_VERSION__}</small> <br />
|
||||
<small> Commit: {__REDOC_REVISION__}</small>
|
||||
</ErrorWrapper>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user