diff --git a/packages/compass-components/src/hooks/use-error-details.tsx b/packages/compass-components/src/hooks/use-error-details.tsx
index 238f76fc509..89e2550ebcf 100644
--- a/packages/compass-components/src/hooks/use-error-details.tsx
+++ b/packages/compass-components/src/hooks/use-error-details.tsx
@@ -1,7 +1,15 @@
import { showConfirmation } from './use-confirmation';
import { Code, ConfirmationModalVariant } from '../components/leafygreen';
+import { css } from '@leafygreen-ui/emotion';
+import { spacing } from '@leafygreen-ui/tokens';
import React from 'react';
+const errorDetailsContentStyles = css({
+ paddingTop: spacing[400], // small gap above JSON
+ maxHeight: '60vh', // cap JSON area height so footer can stay visible
+ overflow: 'auto', // scroll JSON when long
+});
+
export const showErrorDetails = function showErrorDetails({
details,
closeAction,
@@ -12,13 +20,15 @@ export const showErrorDetails = function showErrorDetails({
void showConfirmation({
title: 'Error details',
description: (
-
- {JSON.stringify(details, undefined, 2)}
-
+
+ {JSON.stringify(details, undefined, 2)}
+
+