Openstatus www.openstatus.dev
at 4c0f4c00a38753a5d0dfd7e7b7b7706dec6f1503 25 lines 619 B view raw
1"use client"; 2 3import * as Sentry from "@sentry/nextjs"; 4import NextError from "next/error"; 5import { useEffect } from "react"; 6 7export default function GlobalError({ 8 error, 9}: { 10 error: Error & { digest?: string }; 11}) { 12 useEffect(() => { 13 Sentry.captureException(error); 14 }, [error]); 15 16 return ( 17 <html lang="en"> 18 <body> 19 {/* This is the default Next.js error component but it doesn't allow omitting the statusCode property yet. */} 20 {/* biome-ignore lint/suspicious/noExplicitAny: <explanation> */} 21 <NextError statusCode={undefined as any} /> 22 </body> 23 </html> 24 ); 25}