A overhaul of Castle, a player search engine built with Chess.com's API.
Because of Chess.com's rate limiting for parallel requests, encapsulating all fetch calls in a Promise.all()
can cause a CORS error if the provided key like username
doesn't exist in their database. For these reasons, calls to their API must be done sequentially.
After some testing, it seems like you can have at most 2 parallel calls. Anymore more than that may cause you to get rate limited.