2020-05-21 17:18:17 +00:00
|
|
|
import NotFound from './404'
|
2021-07-27 22:43:40 +00:00
|
|
|
import Bugsnag from '@hashicorp/platform-runtime-error-monitoring'
|
2020-01-18 00:18:09 +00:00
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
function Error({ statusCode }) {
|
|
|
|
return <NotFound statusCode={statusCode} />
|
|
|
|
}
|
2020-04-02 18:37:33 +00:00
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
Error.getInitialProps = ({ res, err }) => {
|
|
|
|
if (err) Bugsnag.notify(err)
|
|
|
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
|
|
|
return { statusCode }
|
2020-01-18 00:18:09 +00:00
|
|
|
}
|
2020-05-21 17:18:17 +00:00
|
|
|
|
|
|
|
export default Error
|