Help! My Logic Apps retries are not firing!

Cloud native applications need to be designed to cope with failure.  Logic Apps meets this expectation through its configurable retry mechanisms that are available on each action.  However, these retries are not firing in every scenario.  Let’s have a look why and how we can work around it.

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.  Thx Jef for the screenshot 😉

retry1

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

About me

Hi! I’m Toon Vanhoutte, a hands-on Azure architect – based in Belgium – with a big passion for teaching and helping people out. I’m happy to assist you during your Azure journey with high-quality advisory and I would love to teach you Azure’s possibilities via my tailored training courses.

Subscribe to the blog