Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!