({ error }: { error: Error & { digest?: string } })
| 5 | import { useEffect } from "react"; |
| 6 | |
| 7 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected