File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
2+ import HTTPStatus from 'http-status'
23import Head from './head'
34
45export default class Error extends React . Component {
@@ -11,7 +12,7 @@ export default class Error extends React.Component {
1112 const { statusCode } = this . props
1213 const title = statusCode === 404
1314 ? 'This page could not be found'
14- : ( statusCode ? 'Internal Server Error' : ' An unexpected error has occurred')
15+ : HTTPStatus [ statusCode ] || ' An unexpected error has occurred'
1516
1617 return < div style = { styles . error } >
1718 < Head >
Original file line number Diff line number Diff line change 6565 "glamor" : " 2.20.23" ,
6666 "glob-promise" : " 3.1.0" ,
6767 "htmlescape" : " 1.1.1" ,
68+ "http-status" : " 1.0.1" ,
6869 "is-windows-bash" : " 1.0.3" ,
6970 "json-loader" : " 0.5.4" ,
7071 "loader-utils" : " 0.2.16" ,
You can’t perform that action at this time.
0 commit comments