open-nomad/website/pages/_error.jsx
Jeff Escalante 6c8f079d24
new website
2020-02-06 18:45:31 -05:00

14 lines
387 B
JavaScript

import React from 'react'
import ErrorPage from 'next/error'
import bugsnagClient from '../lib/bugsnag'
export default class Page extends React.Component {
static async getInitialProps(ctx) {
if (ctx.err) bugsnagClient.notify(ctx.err)
return ErrorPage.getInitialProps(ctx)
}
render() {
return <ErrorPage statusCode={this.props.statusCode || '¯\\_(ツ)_/¯'} />
}
}