Skip to content

Commit

Permalink
chore(sentry): add error to error-page
Browse files Browse the repository at this point in the history
  • Loading branch information
emilielr committed Nov 25, 2024
1 parent 484b12d commit f14d78b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tavla/app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<main className="container pb-10 flex flex-col items-center">
<Heading3>Au da! Noe gikk galt!</Heading3>
Expand Down

0 comments on commit f14d78b

Please sign in to comment.