mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Removed overly-specific handling of handlebars errors
refs: https://github.com/TryGhost/Ghost/issues/10496 refs: https://github.com/handlebars-lang/handlebars.js/issues/1548 - For a while, handlebars would and could generate quite a lot of obscure sytnax error messages for malformed helpers that we couldn't catch in gscan - This was fixed in https://github.com/handlebars-lang/handlebars.js/issues/1548 - We have also since added AST parsing to gscan, so if there are more obscure syntax errors, we should be able to add rules to catch them - Therefore, this additional, overly specific code block isn't needed anymore, so let's clean it up!
This commit is contained in:
parent
3315ed34ae
commit
303ea87897
1 changed files with 0 additions and 8 deletions
|
@ -105,14 +105,6 @@ _private.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.GhostError({
|
||||
err: err,
|
||||
|
|
Loading…
Add table
Reference in a new issue