Files
the-example-app-nodejs/views/error.pug
2018-02-16 11:57:41 +01:00

42 lines
1.5 KiB
Plaintext

extends layout
include mixins/_breadcrumb
block content
.layout-centered
.error
h1 #{translate('somethingWentWrongLabel', currentLocale.code)} (#{error.status})
// We use the last line to have a human readable output for pug error messages
p #{error.message.split('\n').pop()}
h2 #{translate('hintsLabel', currentLocale.code)}
ul
case error.status
when 404
li #{translate('notFoundErrorHint', currentLocale.code)}
li #{translate('draftOrPublishedErrorHint', currentLocale.code)}
when 400
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('stackTraceErrorHint', currentLocale.code)}
if helpers.isCustomCredentials(settings)
form(action='/settings?reset=true' method='POST')
p
button(type="submit") #{translate('resetCredentialsLabel', currentLocale.code)}
if error.response
h2 #{translate('errorLabel', currentLocale.code)}
pre.error__stack-trace
code.shell #{helpers.dump(error.response.data)}
if error.stack
h2 #{translate('stackTraceLabel', currentLocale.code)}
pre.error__stack-trace
code.shell #{error.stack}