diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx new file mode 100644 index 0000000..68e60d9 --- /dev/null +++ b/src/app/global-error.tsx @@ -0,0 +1,23 @@ +"use client"; + +import * as Sentry from "@sentry/nextjs"; +import NextError from "next/error"; +import { useEffect } from "react"; + +export default function GlobalError({ + error, +}: { + error: Error & { digest?: string }; +}) { + useEffect(() => { + Sentry.captureException(error); + }, [error]); + + return ( + + + + + + ); +}