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:
parent
9f11140ec4
commit
004371be36
1 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue