Answer the question
In order to leave comments, you need to log in
Error sending express http response after request to database?
Colleagues, hello.
There is such a controller (it makes no sense, just indicative).
async register(req, res) {
try {
await UserModel.findAll();
console.log('THIS');
res.send('THIS');
}catch (e) {
res.send('ERROR');
console.log('ERROR CATCHING');
}
Answer the question
In order to leave comments, you need to log in
Issue resolved. By my own stupidity, in the middleware, when checking the connection to the database, I called next () twice
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question