mirror of https://github.com/status-im/consul.git
16 lines
406 B
JavaScript
16 lines
406 B
JavaScript
import NotFound from './404'
|
|
import Bugsnag from '@hashicorp/platform-runtime-error-monitoring'
|
|
|
|
function Error({ statusCode }) {
|
|
console.log('this is working')
|
|
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
|