2020-05-19 18:32:38 +00:00
|
|
|
import NotFound from './404'
|
2021-07-26 14:26:50 +00:00
|
|
|
import Bugsnag from '@hashicorp/platform-runtime-error-monitoring'
|
2020-04-06 20:27:35 +00:00
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
function Error({ statusCode }) {
|
|
|
|
console.log('this is working')
|
|
|
|
return <NotFound statusCode={statusCode} />
|
2020-04-06 20:27:35 +00:00
|
|
|
}
|
2020-05-19 18:32:38 +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
|