Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Node JS server Stops working with multiple requests

Node JS Error Uncaught (in promise) InternalError: too much recursion

I get this error when i click on a button it sends json data to the server and does an sql search the sql results are then sent back to the client side when it is then added to the HTML the issue i am getting is when i click on the button it only runs if i click 2 times otherwise i get an empty string. How can i reslove this

The other issue is that the button click will stop working after a few clicks and will stop returning the data from the .fetch and will only work if i reload the page and if i stop the node server and run it again i will get [] empty arrays in the console instead of the value

fetch('/exercisechange',configObj)
               .then(function(response) {
                    return response.json();
                })
                .then(function(object) {
                    console.log(object);
                });

                fetch('api/workout')
                .then(response => response.json())
                .then(data =>{

this is apart of the code on the client side the first used to send the JSON file to the server and the second fetch will put data on the server

I use app.post to retrieve from sql and an async app.get to send back to client side

Thanks

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda