diff --git a/src/app-layout/__tests__/widget-areas-error-boundaries.test.tsx b/src/app-layout/__tests__/widget-areas-error-boundaries.test.tsx
index c82dd1cbcb..f0991f98b4 100644
--- a/src/app-layout/__tests__/widget-areas-error-boundaries.test.tsx
+++ b/src/app-layout/__tests__/widget-areas-error-boundaries.test.tsx
@@ -87,6 +87,7 @@ describe('AppLayout error boundaries: errors in different areas does not crash t
(wrappedWithErrorBoundary: boolean) => {
const onError = jest.fn();
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
+ const consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {});
const AppLayoutWrapper = wrappedWithErrorBoundary ? ErrorBoundary : 'div';
const appLayoutWrapperProps = wrappedWithErrorBoundary ? { onError } : {};
const content =
content
;
@@ -104,6 +105,10 @@ describe('AppLayout error boundaries: errors in different areas does not crash t
appLayoutPart,
errorMessage: expect.any(String),
});
+ expect(consoleLogSpy).toHaveBeenCalledWith(
+ `[AwsUiAppLayoutError] appLayoutPart=${appLayoutPart}`,
+ expect.anything()
+ );
}
const reportedParts = sendPanoramaMetricSpy.mock.calls
.filter(call => call[0] === 'awsui-app-layout-error-boundary-fired')
diff --git a/src/error-boundary/internal.tsx b/src/error-boundary/internal.tsx
index b629723ae6..09f74c70a4 100644
--- a/src/error-boundary/internal.tsx
+++ b/src/error-boundary/internal.tsx
@@ -110,6 +110,7 @@ export function AppLayoutBuiltInErrorBoundary({
errorMessage: error?.error?.message ?? '',
appLayoutPart: appLayoutPart ?? '',
});
+ console.log(`[AwsUiAppLayoutError] appLayoutPart=${appLayoutPart ?? ''}`, error?.error);
}}
>