diff --git a/core/server/helpers/ghost_head.js b/core/server/helpers/ghost_head.js index 8c7d7f5af4..d0570216f1 100644 --- a/core/server/helpers/ghost_head.js +++ b/core/server/helpers/ghost_head.js @@ -84,6 +84,7 @@ function getAjaxHelper(clientId, clientSecret) { module.exports = function ghost_head(options) { debug('begin'); + // if server error page do nothing if (this.statusCode >= 500) { return; diff --git a/core/server/middleware/error-handler.js b/core/server/middleware/error-handler.js index 8e8b956879..62eb0c47ea 100644 --- a/core/server/middleware/error-handler.js +++ b/core/server/middleware/error-handler.js @@ -81,11 +81,13 @@ _private.HTMLErrorRenderer = function HTMLErrorRender(err, req, res, next) { } var templateData = { - message: err.message, - code: err.statusCode, - errorDetails: err.errorDetails || [] - }, - template = templates.error(err.statusCode); + message: err.message, + // @deprecated + code: err.statusCode, + statusCode: err.statusCode, + errorDetails: err.errorDetails || [] + }, + template = templates.error(err.statusCode); // It can be that something went wrong with the theme or otherwise loading handlebars // This ensures that no matter what res.render will work here