log req.method

This commit is contained in:
Matteo Pagliazzi
2016-05-31 16:37:34 +02:00
parent bcbf00d42c
commit ee836c76a4
2 changed files with 2 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ module.exports = function errorHandler (err, req, res, next) { // eslint-disable
// log the error
logger.error(err, {
method: req.method,
originalUrl: req.originalUrl,
headers: omit(req.headers, ['x-api-key', 'cookie']), // don't send sensitive information that only adds noise
body: req.body,