0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Revert "Removed overly-specific handling of handlebars errors"

This reverts commit 303ea87897.

- Although gscan catches these now, we have a number of sites that have slipped through the net
- Reverting until we get them all cleaned up
This commit is contained in:
Hannah Wolfe 2021-12-01 12:04:36 +00:00
parent 9f11140ec4
commit 004371be36
No known key found for this signature in database
GPG key ID: AB586C3B5AE5C037

View file

@ -81,6 +81,14 @@ module.exports.prepareError = (err, req, res, next) => {
err = new errors.NotFoundError({
err: err
});
} else if (err.stack.match(/node_modules\/handlebars\//)) {
// Temporary handling of theme errors from handlebars
// @TODO remove this when #10496 is solved properly
err = new errors.IncorrectUsageError({
err: err,
message: err.message,
statusCode: err.statusCode
});
} else {
err = new errors.InternalServerError({
err: err,