Properly log the errorInfo in ErrorBoundary
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Properly log the `errorInfo` in `ErrorBoundary`
|
||||
@@ -79,7 +79,7 @@ export const ErrorBoundary: ComponentClass<
|
||||
|
||||
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`ErrorBoundary, error: ${error}, info: ${errorInfo}`);
|
||||
console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });
|
||||
this.setState({ error, errorInfo });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user