After a certain number of sequential requests made in short bursts (normally around 180 requests but I managed to get it down to 50 if the first batch of more than 180 requests succeeds) respecting the API throttle (only 10 concurrent requests with a delay of 1.1 second between each batch), the API, seemingly with a random chance, returns an empty response with CORS headers not set resulting, obviously, in a CORS error for the client application.
Here is a screenshot of the error happening after 176 requests:
And here is one of the error happening after 50 requests:
And here is some info about the error response that follows a normal one:
|Response headers||cache-control: no-cache
|API key provided?||Yes|
|Free daily quota||more than 8500 as per the last successful request|
At no point before the error occurs a
backoff field is returned but that shouldn't have mattered either way because the code I first reproduced this on was set up to properly handle encountering
backoff in a given response. It should also be mentioned that according to the API docs, making less than 30 requests in a second should be fine (however, the reproducing code was specifically designed to only make 10 requests per second):
If a single IP is making more than 30 requests a second, new requests will be dropped.
A very similar set of issues were reported before, and some were even supposed to be fixed:
See this MSO answer of mine for the code that reproduces the error (user id
674039 will result in 191 request to make) - if it succeed on first try, rerun it, and you will likely get the error much earlier (please be weary of your daily API quota if you are a userscript user).
Can this be looked into?