Manuel
Manuel

Reputation: 15

Azure function ExceptionHandling

I have an Azure Function and I'm not sure if it throws an exception or not when it runs. I have a try and catch block and throw the exception in the Function itself but all runs are shown as succeeded. Where would I find the errors/exceptions of an Azure function and how can I log it in the best way possible?

Best regards Manuel

Upvotes: 1

Views: 306

Answers (1)

Thiago Custodio
Thiago Custodio

Reputation: 18387

the best approach would be if you could add Application Insights to your Azure Functions. You could monitor in real time or also search for Failures. If that is not possible, you can enable log stream and check over there:

More info:

https://microsoft.github.io/AzureTipsAndTricks/blog/tip30.html

https://learn.microsoft.com/en-us/azure/azure-functions/functions-monitoring

Upvotes: 2

Related Questions