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'
5 years ago
import ErrorDisplay from '~/components/errorDisplay'
5 years ago
const ErrorPage = ({statusCode}) => (
<>
<ErrorDisplay error={error} />
</>
)
5 years ago
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 }
}
5 years ago
export default ErrorPage