diff --git a/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx b/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx
index 9a6478126045..f975277a3a4a 100644
--- a/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx
@@ -7,6 +7,10 @@
import React from 'react';
import Translate from '@docusaurus/Translate';
+import {
+ ErrorBoundaryError,
+ ErrorBoundaryTryAgainButton,
+} from '@docusaurus/theme-common';
import type {Props} from '@theme/Error';
export default function ErrorPageContent({
@@ -24,15 +28,15 @@ export default function ErrorPageContent({
This page crashed.
-
{error.message}
-
-
+
+
+
+
+
+
diff --git a/packages/docusaurus-theme-common/src/index.ts b/packages/docusaurus-theme-common/src/index.ts
index 4c3863016184..3b8e6e7df28d 100644
--- a/packages/docusaurus-theme-common/src/index.ts
+++ b/packages/docusaurus-theme-common/src/index.ts
@@ -89,3 +89,8 @@ export {
SkipToContentFallbackId,
SkipToContentLink,
} from './utils/skipToContentUtils';
+
+export {
+ ErrorBoundaryTryAgainButton,
+ ErrorBoundaryError,
+} from './utils/errorBoundaryUtils';
diff --git a/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.module.css b/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.module.css
new file mode 100644
index 000000000000..6b6ecfa607d1
--- /dev/null
+++ b/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.module.css
@@ -0,0 +1,11 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+.errorBoundaryError {
+ white-space: pre-wrap;
+ color: red;
+}
diff --git a/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.tsx b/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.tsx
new file mode 100644
index 000000000000..193ec7cd4ff7
--- /dev/null
+++ b/packages/docusaurus-theme-common/src/utils/errorBoundaryUtils.tsx
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React, {type ComponentProps} from 'react';
+import Translate from '@docusaurus/Translate';
+import styles from './errorBoundaryUtils.module.css';
+
+export function ErrorBoundaryTryAgainButton(
+ props: ComponentProps<'button'>,
+): JSX.Element {
+ return (
+
+ );
+}
+
+export function ErrorBoundaryError({error}: {error: Error}): JSX.Element {
+ return