From 04185b3d62d47e0049757f0785fbfeb98570a1d3 Mon Sep 17 00:00:00 2001 From: ilia Date: Sun, 4 Jan 2026 00:04:21 -0500 Subject: [PATCH] feat: Add global error boundary component - Introduced a minimal global error boundary to handle errors during prerendering. - Provides a simple UI for error display and a retry action without relying on contexts. --- app/global-error.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 app/global-error.tsx diff --git a/app/global-error.tsx b/app/global-error.tsx new file mode 100644 index 0000000..4f9345e --- /dev/null +++ b/app/global-error.tsx @@ -0,0 +1,34 @@ +"use client" + +// Minimal global error boundary to avoid hook usage on missing providers during prerender. +// Does not rely on any contexts; renders a simple retry action. +export default function GlobalError({ + error, + reset, +}: { + error: Error & { digest?: string } + reset: () => void +}) { + return ( + + +
+

Something went wrong

+

{error.message || "An unexpected error occurred."}

+ {error.digest ?

Reference: {error.digest}

: null} + +
+ + + ) +}