diff --git a/api/src/index.js b/api/src/index.js index 21579b0..29f4c1c 100644 --- a/api/src/index.js +++ b/api/src/index.js @@ -59,6 +59,14 @@ const app = express(); app.use(body_parser.urlencoded({ extended: true })); app.use(body_parser.json()); + app.use(function (err, req, res, next) { + return res + .status(400) + .send({ + stack: err.stack + }) + }) + const validate = (req, res, next) => { const errors = validationResult(req);