I'm creating an application that at some point needs to get the total revenue from Orders API and the number of products from Products API.
When a run the method that gets all the information, it sometimes breaks sometimes doesn't. After a little bit of testing, I noticed that the problem wasn't my code but me getting a 429 (Too many requests).
After some point, I read that the rate-limit from Shopify is 2 requests/second, meaning that I'm within the rate-limit, but again the error happens from time to time.
I would like to know why this keeps happening? It's not an error code but an error status_code that I get from Shopify that is preventing me from testing my entire application.
Does anyone has encountered this problem, know how to fix or any ideas that can help me find a solution?
I'm currently coding with Python using Django as an API.