diff --git a/src/app/error.tsx b/src/app/error.tsx
index a34504181b..142f8237b5 100644
--- a/src/app/error.tsx
+++ b/src/app/error.tsx
@@ -1,32 +1,20 @@
"use client";
-import { useEffect } from "react";
+import { ErrorPage } from "@/components/ErrorPage";
const ErrorBoundary = ({
error,
- reset,
}: {
- error: Error & { digest?: string };
- reset: () => void;
+ error: Error & { digest?: string; statusCode?: string };
}) => {
- useEffect(() => {
- // Log the error to an error reporting service
- console.error(error);
- }, [error]);
-
+ console.log(error.cause);
return (
-
-
Something went wrong!
-
-
+
);
};
diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx
index 3440a40d18..71e433da4e 100644
--- a/src/app/not-found.tsx
+++ b/src/app/not-found.tsx
@@ -1,11 +1,12 @@
-import Link from "next/link";
+import "server-only";
+import { ErrorPage } from "@/components/ErrorPage";
export default function NotFound() {
return (
-
-
Not Found
-
Could not find requested resource
-
Return Home
-
+
);
}
diff --git a/src/components/ErrorPage.tsx b/src/components/ErrorPage.tsx
new file mode 100644
index 0000000000..332ca88646
--- /dev/null
+++ b/src/components/ErrorPage.tsx
@@ -0,0 +1,61 @@
+import { DashboardContainer } from "@/components/DashboardContainer";
+import { DataBlockWithCopy } from "@/components/requirements/DataBlockWithCopy";
+import { Anchor } from "@/components/ui/Anchor";
+import { buttonVariants } from "@/components/ui/Button";
+
+// TODO: simple compound component when design is certain
+
+const ErrorPage = ({
+ title,
+ description,
+ correlationId,
+ errorCode,
+}: {
+ title: string;
+ description: string;
+ correlationId?: string;
+ errorCode: string;
+}) => {
+ return (
+
+
+
+
+ {title}
+
+
+ {description}
+
+
+ Return Home
+
+
+
+
+
+
+ );
+};
+
+export { ErrorPage };