'use client'; import { useEffect } from 'react'; import { reportError } from '@/lib/observability/reporter'; import './globals.css'; /** * Last-resort boundary: an error thrown while rendering the root layout itself * escapes app/error.tsx, so this file replaces the whole document, `` and * `` included. It is deliberately self-contained -- the font CSS vars come * from the root layout that just failed, so it leans on globals.css defaults and * a raw button instead of shared components. */ export default function GlobalError({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) { useEffect(() => { console.error(error); // Usually a no-op client-side: when the root layout itself failed, // SentryInit never mounted. The server-side render error was already // captured via `onRequestError` in instrumentation.ts. reportError(error); }, [error]); return (

> SYSTEM FAULT

The application crashed.

A fatal error stopped the app from rendering. Reloading may recover it.

{error.digest !== undefined && (

ref: {error.digest}

)}
); }