8eed94b072
* website maintenance round * improve docs, revert bug workaround as it was fixed * boost memory * remove unnecessary code
15 lines
366 B
JavaScript
15 lines
366 B
JavaScript
import NotFound from './404'
|
|
import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
|
|
|
function Error({ statusCode }) {
|
|
return <NotFound statusCode={statusCode} />
|
|
}
|
|
|
|
Error.getInitialProps = ({ res, err }) => {
|
|
if (err) Bugsnag.notify(err)
|
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
|
return { statusCode }
|
|
}
|
|
|
|
export default Error
|