Showing
1 changed file
with
1 additions
and
1 deletions
@@ -32,8 +32,8 @@ exports.notFound = () => { | @@ -32,8 +32,8 @@ exports.notFound = () => { | ||
32 | */ | 32 | */ |
33 | exports.serverError = () => { | 33 | exports.serverError = () => { |
34 | return (err, req, res, next) => { | 34 | return (err, req, res, next) => { |
35 | - if (!res.headersSent) { | ||
36 | logger.error(err); | 35 | logger.error(err); |
36 | + if (!res.headersSent) { | ||
37 | if (req.xhr) { | 37 | if (req.xhr) { |
38 | return res.status(500).json({ | 38 | return res.status(500).json({ |
39 | code: 500, | 39 | code: 500, |
-
Please register or login to post a comment