Relative Content

Tag Archive for javaapinetworkingcorspostman

Receiving CORS Error in Browser and 500 Internal Server Error Through API When Website Was Previously Working

I was looking into the network calls made by a website (not mine) to understand how the website works. Each time I would reload the page, I would look at the network calls being made in the developer tools of Chrome. Then, I would sift through the calls, find the one I wanted, and see what parameters it took, etc. I then recreated the call in Postman to get the syntax down and find all the necessary parameters before finally coding it into a little bot I’m making as a side project. I was doing this over and over with no problem until suddenly, I started getting a 500 Internal Server Error on the second call. I haven’t changed anything in my code or in Postman, but both are now returning a 500 error when previously they were successful. These are simple GET requests with just a couple parameters. The first API call in the process goes through fine, but the second one returns a 500 error. When I checked online as well, I am seeing that the first call is being made on the corresponding page, but when I navigate to the next page for the second call, it is stuck loading. When looking at the console in the developer tools, it is complaining about a CORS Error. Now, even if I go on my phone and check, the same thing is happening, but if I disconnect from wifi the page loads fine. What happened? How do I fix it?