diff --git a/lib/error.js b/lib/error.js index 7248d1dd..cef4d786 100644 --- a/lib/error.js +++ b/lib/error.js @@ -1,4 +1,5 @@ import React from 'react' +import HTTPStatus from 'http-status' import Head from './head' export default class Error extends React.Component { @@ -11,7 +12,7 @@ export default class Error extends React.Component { const { statusCode } = this.props const title = statusCode === 404 ? 'This page could not be found' - : (statusCode ? 'Internal Server Error' : 'An unexpected error has occurred') + : HTTPStatus[statusCode] || 'An unexpected error has occurred' return