diff --git a/tavla/app/error.tsx b/tavla/app/error.tsx index 7eb8c3a23..78ee17a2e 100644 --- a/tavla/app/error.tsx +++ b/tavla/app/error.tsx @@ -5,8 +5,17 @@ import { Heading3 } from '@entur/typography' import Image from 'next/image' import Link from 'next/link' import BeaverIllustration from 'assets/illustrations/Beaver.png' +import { useEffect } from 'react' +import * as Sentry from '@sentry/nextjs' -export default function Error() { +export default function Error({ + error, +}: { + error: Error & { digest?: string } +}) { + useEffect(() => { + Sentry.captureException(error) + }, [error]) return (
Au da! Noe gikk galt!