diff options
| author | MaheshtheDev <[email protected]> | 2025-08-21 19:46:41 +0000 |
|---|---|---|
| committer | MaheshtheDev <[email protected]> | 2025-08-21 19:46:41 +0000 |
| commit | 52cbf55763fa51bcf3497d3b760eed87ca515b7d (patch) | |
| tree | 625d0a7ba31aad1317dd710abebea882a036ebae /apps/web/app | |
| parent | Add AI SDK Utilities (#375) (diff) | |
| download | supermemory-52cbf55763fa51bcf3497d3b760eed87ca515b7d.tar.xz supermemory-52cbf55763fa51bcf3497d3b760eed87ca515b7d.zip | |
feat: sentry integration (#376)
Diffstat (limited to 'apps/web/app')
| -rw-r--r-- | apps/web/app/global-error.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/web/app/global-error.tsx b/apps/web/app/global-error.tsx new file mode 100644 index 00000000..9bda5fee --- /dev/null +++ b/apps/web/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 ( + <html> + <body> + {/* `NextError` is the default Next.js error page component. Its type + definition requires a `statusCode` prop. However, since the App Router + does not expose status codes for errors, we simply pass 0 to render a + generic error message. */} + <NextError statusCode={0} /> + </body> + </html> + ); +}
\ No newline at end of file |