I am currently making a configuration that hits the api rate limit of the system i’m connecting to, sadly the rate limiter that Alumio offers does not work this api on since it expects an int to be given but the api response is x/40
Keen eyed will spot that this is a shopify api, and the standard shopify connectors would probably solve this issue but sadly i do not think i can use those since this call is made within a loop using a http transformer.
in short what is my request:
that the api rate limit also accepts 5/40 input
At the moment, we don’t support handling the Shopify rate limit using X-Shopify-Shop-Api-Call-Limit header. However, we already have a story to implement rate limit handling using the Retry-After header in our roadmap.
As a workaround, the Sleep Transformer solution from @abubakar would work for you. Another solution is to use an HTTP client plugin called Retry requests on failure. The plugin will order Alumio to retry the request when the response’s status code is between a range of numbers. Please find the below sample.
@jesse.wever possibly you can optimise it a little further by conditionally letting the transformer sleep?
There’s a option to retrieve the request headers on the HTTP transformer. It’s called Add headers to response body. You can then parse the Shopify rate-limiting header and based on your condition, i.e. value equals 40/40, you could execute the Sleep transformer. This way you don’t create unneeded 429s to the Shopify API and possibly increase the throughput of your integration.