diff --git a/.changeset/cool-garlics-clap.md b/.changeset/cool-garlics-clap.md new file mode 100644 index 0000000000..223d0a1233 --- /dev/null +++ b/.changeset/cool-garlics-clap.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Properly log the `errorInfo` in `ErrorBoundary` diff --git a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx index 8f746882a1..b3a5d1db90 100644 --- a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx +++ b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx @@ -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 }); }