Reputation: 405
when i pass wrong QueryParams value like minus value. occur Unhandled rejection SequelizeDatabaseError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-8, 4' at line 1 that situation not get response from server
http://localhost:500/XXX/getXXX?currentPage=-1&numPerPage=4
Upvotes: 0
Views: 423
Reputation: 9609
Most likely global error was not handled properly. Try adding it to your routes.
app.use(function(err, req, res, next) {
console.error(err);
res.status(500).send('internal server error');
})
Upvotes: 0