I have a simple logic app running an Azure Function on a recurrence trigger (every day). I want to send the IT department an email if there is a problem running the Function. Here's my Logic App setup:
However, whenever there is an error (for exemple, the azure function returns an HTTP code 500, like so:)
return req.CreateResponse(HttpStatusCode.InternalServerError, new
{
error = $"{errorMessage}. {ex.Message}"
});
the Logic App flow just stops before I can check the status code an react to it:
So my question is: is there a way to handle an Azure Function error response code?