0
In an app in Ionic 3 I have this function validarCupom() that when called sends a GET to , if it has the return 200 (OK), then calls the other function setBonificacaoConveniado().
Below is the function that needs to be called if the first is successful.
At the end, the code that the setBonificacaoConveniado() function should run in the API.
In the application’s debug console, it appears that the status in validarCupom was 200, it makes changes in database fields, everything working, but when it arrives to enter the setBonificacaoConveniado it bursts this error.
Put in the question the code and not images, there is a button in the Question editor that delimits the code so color taking into account the code regarding the tags.
– Wictor Chaves
The problem could be
res.status(200).send({result})
on line 602 Node only sends a Answer by request and Try below has another query with error Answer that could not be sent even if there is an error, because Answer has already been called.– Chance