HTTP 500 error from HTTP Triggered Azure Function even though Log Stream indicates successful completion of the function
Matthew Castrigno
5
Reputation points
I have a HTTP Triggered function that runs locally in Visual Studio fine. Monitoring in the Log Stream also show successful completion. However, the browser shows a 500 error even though there is nothing to return to the browser. How can I get rid of this error message?
public static class ValidateFunction
{
[FunctionName("Validate")]
public static async Task Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("Validate HTTP trigger function processed a request.");
var responsebody = await HttpService.LeanIXAPI.Validate();
var writeResponse = FtpService.WriteFTP.WriteToArcherFTP(responsebody, "test", "./ValidationResults.txt");
log.LogInformation($"Validate response was: {writeResponse}");
return;
}
}