2020-05-29 17:12:05 -04:00
|
|
|
import NotFound from './404'
|
|
|
|
import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
2020-03-18 18:46:47 -04:00
|
|
|
|
2020-05-29 17:12:05 -04:00
|
|
|
function Error({ statusCode }) {
|
|
|
|
return <NotFound statusCode={statusCode} />
|
2020-03-18 18:46:47 -04:00
|
|
|
}
|
2020-05-29 17:12:05 -04:00
|
|
|
|
|
|
|
Error.getInitialProps = ({ res, err }) => {
|
|
|
|
if (err) Bugsnag.notify(err)
|
|
|
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
|
|
|
return { statusCode }
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Error
|