Closed ching-xia closed 1 year ago
IMO 429 seems like an appropriate error in this case, and retrying makes sense to me. The client is not aware of when the rate limit resets so retrying is not a terrible idea (after all, it might reset within the next few seconds and subsequently, the request succeeds).
What do you think should be the behavior of the client in the scenario you described?
Description
There is a bug in the goshopify.go file, line 431, function wrapSpecificError. When the shop reaches the limit of creating products every day, the response error status is 429 (Too Many Requests), but retrying the request will not help.
Steps to reproduce
More Info:
responseError Status: 429 responseError Message: "product: Daily variant creation limit reached. Please try again later. See https://help.shopify.com/api/getting-started/api-call-limit for more information about rate limits and how to avoid them."
Shopify API Limit Doc
Resource-based rate limitsAnchor link to section titled "Resource-based rate limits"
The following Admin API resources, in both GraphQL and REST versions, have an additional throttle that takes effect when a store has 50,000 product variants. After this threshold is reached, no more than 1,000 new variants can be created per day.
In certain cases, Shopify needs to enforce rate limiting in order to prevent abuse of the platform. Therefore, your app should be prepared to handle rate limiting on all endpoints, rather than just those listed here.