Files
klz-cables.com/app/global-error.tsx
Marc Mintel 6e34392976
Some checks failed
Build & Deploy / deploy (push) Failing after 3m39s
build
2026-01-19 20:46:39 +01:00

25 lines
498 B
TypeScript

'use client';
import * as Sentry from '@sentry/nextjs';
import Error from 'next/error';
import { useEffect } from 'react';
export default function GlobalError({
error,
}: {
error: Error & { digest?: string };
}) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
return (
<html>
<body>
{/* This is the default Next.js error component but it doesn't allow omitting the statusCode */}
<Error statusCode={0} />
</body>
</html>
);
}