...
|
...
|
@@ -32,8 +32,8 @@ exports.notFound = () => { |
|
|
*/
|
|
|
exports.serverError = () => {
|
|
|
return (err, req, res, next) => {
|
|
|
if (!res.headersSent) {
|
|
|
logger.error(err);
|
|
|
if (!res.headersSent) {
|
|
|
if (req.xhr) {
|
|
|
return res.status(500).json({
|
|
|
code: 500,
|
...
|
...
|
|