mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added debug log in error handler
no issue - very helpful when a test is not green - `DEBUG=ghost:error-handler`
This commit is contained in:
parent
691daa2a49
commit
e99fb78b66
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
var _ = require('lodash'),
|
||||
hbs = require('express-hbs'),
|
||||
debug = require('ghost-ignition').debug('error-handler'),
|
||||
config = require('../../config'),
|
||||
common = require('../../lib/common'),
|
||||
helpers = require('../../services/routing/helpers'),
|
||||
|
@ -24,6 +25,8 @@ _private.createHbsEngine = function createHbsEngine() {
|
|||
* @TODO: support multiple errors within one single error, see https://github.com/TryGhost/Ghost/issues/7116#issuecomment-252231809
|
||||
*/
|
||||
_private.prepareError = function prepareError(err, req, res, next) {
|
||||
debug(err);
|
||||
|
||||
if (_.isArray(err)) {
|
||||
err = err[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue