I’m trying to get the most recent published version of 4 different places. This is my code:
const url = `https://apis.roblox.com/assets/v1/assets/${placeId}/versions?maxPageSize=50`;
const response = await fetch(url, {
method: "GET",
headers: { "x-api-key": process.env.ROBLOX_SECRET }
})
I’ve been frequently encountering this error:
{ errors: [ { code: 0, message: 'upstream request timeout' } ] }
At first, this error did not appear at all when I was testing without the maxPageSize parameter. Once I added it and raised the page size to 50, all 4 requests errored. I dropped it down to 36 and they all succeeded. Then I raised it up to 50 again and all succeeded except for one particular place (9414511685). Notably, this place has far more versions than any of the others, due to being a Team Create place for most of its existence. The request for this place continues to error with a page size of 50.
Some other things I’ve tried:
I’ve also tried a page size of 48 in case it was an OBOE. No change
Changing my IP address and restarting the server. No change
Waited about an hour to see if maybe the 3 succeeding requests just had cached results or something. No change
Finally, I changed all 4 place IDs to point at our development places.
The first attempt had a page size of 50 and all 4 requests failed.
Tried again at 48 and all 4 still failed.
Tried 36, all failed.
24, all failed
20, 3 out of 4 failed.
Raised back to 24, all failed again.
Down to 18, only 2 failed
Down to 12, all succeeded
Up to 18, 2 failed again
The limit seems to be even lower for these places, possibly because they have incredibly high place version counts (in the thousands instead of the hundreds).
Expected behavior
I should be able to reliably pull down 50 place versions.