Azure Logic Apps: How to Properly Handle API Rate Limiting Errors in HTTP Actions?
After trying multiple solutions online, I still can't figure this out... I'm currently working on an Azure Logic App that makes HTTP calls to a third-party API. The API has a rate limit of 100 requests per minute, and I'm working with issues when I hit that limit. Specifically, I'm getting a `429 Too Many Requests` behavior in the Logic App workflow. I've implemented a retry policy in the HTTP action to handle transient failures, but it seems to retry immediately upon receiving the 429 response, resulting in a loop of retries. Hereβs a snippet of my Logic App definition: ```json { "type": "Http", "inputs": { "method": "GET", "uri": "https://api.example.com/data", "headers": { "Authorization": "Bearer <your_token>" }, "retryPolicy": { "type": "exponential", "interval": "PT10S", "count": 5 } } } ``` I want to implement a delay mechanism that waits until the rate limit resets, but I'm not sure how to dynamically adjust the delay based on the response. The API documentation mentions a `Retry-After` header that specifies how long to wait before retrying. How can I access this header and configure my Logic App to respect it before retrying? Iβve tried using the built-in `@retry` function, but that doesn't seem to allow for custom delay periods based on the API response. Additionally, I need this to be scalable, as I plan to deploy this Logic App across multiple environments with varying traffic levels. Any guidance or examples would be greatly appreciated! Is there a better approach? Am I approaching this the right way?