feat(errors): new error page copy

This commit is contained in:
Benedikt Rötsch
2018-02-14 16:15:32 +01:00
committed by Benedikt Rötsch
parent 3c9089af98
commit 5e55d7b5b4
5 changed files with 47 additions and 47 deletions

View File

@@ -6,24 +6,24 @@ block content
.layout-centered
.error
h1 #{translate('somethingWentWrongLabel', currentLocale.code)} (#{error.status})
p #{error.message}
// We use the last line to have a human readable output for pug error messages
p #{error.message.split('\n').pop()}
h2 #{translate('tryLabel', currentLocale.code)}:
h2 #{translate('hintsLabel', currentLocale.code)}
ul
case error.status
when 404
li #{translate('notFoundErrorLabel', currentLocale.code)}
li #{translate('draftOrPublishedErrorLabel', currentLocale.code)}
li #{translate('notFoundErrorHint', currentLocale.code)}
li #{translate('draftOrPublishedErrorHint', currentLocale.code)}
when 400
li #{translate('contentModelChangedErrorLabel', currentLocale.code)}
when 401
li #{translate('verifyCredentialsErrorLabel', currentLocale.code)}
li #{translate('localeContentErrorLabel', currentLocale.code)}
when 500
li #{translate('contentModelChangedErrorLabel', currentLocale.code)}
li #{translate('contentModelChangedErrorHint', currentLocale.code)}
default
li #{translate('contentModelChangedErrorHint', currentLocale.code)}
li #{translate('draftOrPublishedErrorHint', currentLocale.code)}
li #{translate('localeContentErrorHint', currentLocale.code)}
if error.stack
li #{translate('stackTraceErrorLabel', currentLocale.code)}
li #{translate('stackTraceErrorHint', currentLocale.code)}
if helpers.isCustomCredentials(settings)
form(action='/settings?reset=true' method='POST')