mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Re-attach error to request object if error occurs when rendering error template
no issue - otherwise we won't see the error in the logs
This commit is contained in:
parent
e8075262eb
commit
be9ce107bd
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ _private.HTMLErrorRenderer = function HTMLErrorRender(err, req, res, next) {
|
||||||
return res.send(html);
|
return res.send(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// re-attach new error e.g. error template has syntax error or misusage
|
||||||
|
req.err = err;
|
||||||
|
|
||||||
// And then try to explain things to the user...
|
// And then try to explain things to the user...
|
||||||
// Cheat and output the error using handlebars escapeExpression
|
// Cheat and output the error using handlebars escapeExpression
|
||||||
return res.status(500).send(
|
return res.status(500).send(
|
||||||
|
|
Loading…
Add table
Reference in a new issue