The problem
Logic Apps retries can be configured in several ways:
- Default: 4 retries with increasing intervals between 5 and 45 seconds
- None: no retries at all
- Exponential interval: exponentially growing interval
- Fixed interval: specify a retry count and interval
The retries do not kick off on every exception. Logic Apps only retries transient exceptions, which makes sense. The HTTP status code is used to determine whether an exception is transient or not. The documentation states that retries are fired for HTTP codes 408, 429 and 5XX.
The workaround
What if you need to retry in case the HTTP status code is not within the standard range? Unfortunately, there’s no way to configure the HTTP codes for transient exceptions. In this case, we need to build it ourselves, with the available actions in our Logic Apps toolbox. Below you can find an example, where we leveraged the Do-Until action, with a condition based on the return code. (Thanks to my colleague Jef for the screenshot 😉 )
Conclusion
It would be easier if we had the ability to override the status codes for transient retries. However, I understand that this feature gets lower priority, because a simple workaround is available.
I hope this blog helps you to improve the error handling or your integration solutions!
Toon
Subscribe to our RSS feed