You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
416 B
JavaScript

import React from 'react'
import ErrorDisplay from '~/components/errorDisplay'
const ErrorPage = ({statusCode}) => (
<>
<ErrorDisplay error={error} />
</>
)
ErrorPage.getInitialProps = ({ res, err }) => {
let error = err;
if(!error)
error = new Error('Server Error')
error.status = err.status || (res ? res.statusCode : (error.statusCode || 404))
return { error }
}
export default ErrorPage