vijayrit
vijayrit

Reputation: 11

Retry Mechanism for HTTP Triggered Azure Functions

I have been working on leveraging HTTP triggered Azure functions for automations in my project. But there are cases where the Azure function fails because of network issues and other reasons.

My question is, is it sufficient enough to add a try-catch block in my function to cover such failures, or is there any other way we need to ensure that failed executions are retried.

Upvotes: 1

Views: 1843

Answers (1)

PramodValavala
PramodValavala

Reputation: 6647

If requests from your Azure Function fail, a try/catch block would be the way to go.

If requests to your Azure Function fail, then you could either setup a retry in your client.

Or leverage something like Durable Functions if you would want to prevent multiple invocations for the same request. This would be especially useful if there are intensive actions that are best no repeated.

Upvotes: 1

Related Questions