const errorMessages = { 404: {title: 'Page not found', message: 'Unfortunately that page could not be found. If you followed a link to get here, please let the owner of the link know that they need to update it.'}, [undefined]: {title: 'Unknown error', message: "We're not exactly sure what happened"} } export default function ErrorDisplay({error}){ const defaults = errorMessages[error.status] return ( <>

{error.name || defaults.title}

{error.message || defaults.message}

{process.env.NODE_ENV === 'development' && (
          {JSON.stringify(error, null, 2)}
        
)} ) }