mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
🐛 HTML page error: correct templateData (#9144)
no issue - `this.statusCode` was always undefined - see HTML error handler - it's hard to add a test for this case - manual test only
This commit is contained in:
parent
9f9d8b2fec
commit
8de691d575
2 changed files with 8 additions and 5 deletions
|
@ -84,6 +84,7 @@ function getAjaxHelper(clientId, clientSecret) {
|
||||||
|
|
||||||
module.exports = function ghost_head(options) {
|
module.exports = function ghost_head(options) {
|
||||||
debug('begin');
|
debug('begin');
|
||||||
|
|
||||||
// if server error page do nothing
|
// if server error page do nothing
|
||||||
if (this.statusCode >= 500) {
|
if (this.statusCode >= 500) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -82,7 +82,9 @@ _private.HTMLErrorRenderer = function HTMLErrorRender(err, req, res, next) {
|
||||||
|
|
||||||
var templateData = {
|
var templateData = {
|
||||||
message: err.message,
|
message: err.message,
|
||||||
|
// @deprecated
|
||||||
code: err.statusCode,
|
code: err.statusCode,
|
||||||
|
statusCode: err.statusCode,
|
||||||
errorDetails: err.errorDetails || []
|
errorDetails: err.errorDetails || []
|
||||||
},
|
},
|
||||||
template = templates.error(err.statusCode);
|
template = templates.error(err.statusCode);
|
||||||
|
|
Loading…
Add table
Reference in a new issue