Merge pull request #115 from overleaf/em-request-logger-hotfix

Fix error handler returning two responses
This commit is contained in:
Simon Detheridge 2020-04-03 17:09:41 +01:00 committed by GitHub
commit cd8d4445c0

View file

@ -17,10 +17,7 @@ class RequestLogger {
static errorHandler(err, req, res, next) {
req.requestLogger.addFields({ error: err })
res
.send(err.message)
.status(500)
.end()
res.status(500).send(err.message)
}
static middleware(req, res, next) {