mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 10:02:27 -04:00
17 lines
462 B
TypeScript
17 lines
462 B
TypeScript
import * as Sentry from '@sentry/nextjs'
|
|
import type {NextPageContext} from 'next'
|
|
import NextErrorComponent from 'next/error'
|
|
|
|
type ErrorProps = {
|
|
statusCode: number
|
|
}
|
|
|
|
export default function CustomError({statusCode}: ErrorProps) {
|
|
return <NextErrorComponent statusCode={statusCode} />
|
|
}
|
|
|
|
CustomError.getInitialProps = async (ctx: NextPageContext) => {
|
|
await Sentry.captureUnderscoreErrorException(ctx)
|
|
return NextErrorComponent.getInitialProps(ctx)
|
|
}
|