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:
kirrg001 2017-11-28 13:16:56 +01:00 committed by Kevin Ansfield
parent e8075262eb
commit be9ce107bd

View File

@ -114,6 +114,9 @@ _private.HTMLErrorRenderer = function HTMLErrorRender(err, req, res, next) {
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...
// Cheat and output the error using handlebars escapeExpression
return res.status(500).send(