import React from 'react'; import PropTypes from 'prop-types'; import Head from 'next-server/head'; import useElasticApm from '@@/Commons/hooks/useElasticApm'; const statusCodes = { 400: 'Bad Request', 404: 'This page could not be found', 405: 'Method Not Allowed', 500: 'Internal Server Error', }; function Error(props) { const { statusCode } = props; useElasticApm({ tags: { error: statusCode, }, }); const title = props.title || statusCodes[statusCode] || 'An unexpected error has occurred'; return (