mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
15 lines
514 B
TypeScript
15 lines
514 B
TypeScript
import * as Sentry from '@sentry/nextjs';
|
|
import type { NextPage } from 'next';
|
|
import type { ErrorProps } from 'next/error';
|
|
import NextErrorComponent from 'next/error';
|
|
|
|
const CustomErrorComponent: NextPage<ErrorProps> = (props) => <NextErrorComponent statusCode={props.statusCode} />;
|
|
|
|
CustomErrorComponent.getInitialProps = async (contextData) => {
|
|
await Sentry.captureUnderscoreErrorException(contextData);
|
|
|
|
return NextErrorComponent.getInitialProps(contextData);
|
|
};
|
|
|
|
export default CustomErrorComponent;
|