MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / GlobalError

Function GlobalError

packages/web/src/app/global-error.tsx:7–23  ·  view source on GitHub ↗
({ error }: { error: Error & { digest?: string } })

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected