2020-05-06 23:41:32 +00:00
|
|
|
import NotFound from './404'
|
2021-07-27 21:11:46 +00:00
|
|
|
import Bugsnag from '@hashicorp/platform-runtime-error-monitoring'
|
2020-02-06 23:45:31 +00:00
|
|
|
|
2020-05-06 23:41:32 +00:00
|
|
|
function Error({ statusCode }) {
|
|
|
|
return <NotFound statusCode={statusCode} />
|
2020-02-06 23:45:31 +00:00
|
|
|
}
|
2020-05-06 23:41:32 +00:00
|
|
|
|
|
|
|
Error.getInitialProps = ({ res, err }) => {
|
|
|
|
if (err) Bugsnag.notify(err)
|
|
|
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
|
|
|
return { statusCode }
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Error
|