Rename import to solve conflicting usage of Error constructor (#13256)
This commit is contained in:
parent
94e20be204
commit
6ca26bd960
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import Error from 'next/error'
|
||||
import NextErrorComponent from 'next/error'
|
||||
import * as Sentry from '@sentry/node'
|
||||
|
||||
const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
|
||||
|
@ -9,7 +9,7 @@ const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
|
|||
Sentry.captureException(err)
|
||||
}
|
||||
|
||||
return <Error statusCode={statusCode} />
|
||||
return <NextErrorComponent statusCode={statusCode} />
|
||||
}
|
||||
|
||||
MyError.getInitialProps = async ({ res, err, asPath }) => {
|
||||
|
|
Loading…
Reference in a new issue