The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
at master 23 lines 714 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({ error }: { error: Error & { digest?: string; }; }) { 8 useEffect(() => { 9 Sentry.captureException(error); 10 }, [error]); 11 12 return ( 13 <html> 14 <body> 15 {/* `NextError` is the default Next.js error page component. Its type 16 definition requires a `statusCode` prop. However, since the App Router 17 does not expose status codes for errors, we simply pass 0 to render a 18 generic error message. */} 19 <NextError statusCode={0} /> 20 </body> 21 </html> 22 ); 23}