Removed "code" property from global error variable

refs https://github.com/TryGhost/Toolbox/issues/406
refs b2a3e03ef3

- The "code" property in the global "error" variable (accessible via {{error.*}}) has been long deprecated - time to go, bye!
- When {{code}} or {{error.code}} helpers are used in the templates they will output an empty string from now on. Use {{statusCode}} instead!
This commit is contained in:
Naz 2023-01-06 10:59:59 +07:00
parent f58a7725d6
commit 8911af150a
No known key found for this signature in database

View File

@ -47,8 +47,6 @@ const themeErrorRenderer = (err, req, res, next) => {
// Format Data
const data = {
message: err.message,
// @deprecated Remove in Ghost 5.0
code: err.statusCode,
statusCode: err.statusCode,
errorDetails: err.errorDetails || []
};