public static async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest request, ILogger log) { try { SkillRequest skillRequest = await GetSkillRequestFromRequest(request); bool isValid = await RequestHandlerHelper.ValidateRequest(request, log, skillRequest); if (!isValid) { return(new BadRequestResult()); } ISkillHandler skillHandler = new SkillHandler(skillRequest.Request); return(await skillHandler.GetResultAsync()); } catch (System.Exception e) { log.LogError(e.Message); string speechText = "Pouvez-vous répéter, j'ai mal compris."; SkillResponse response = ResponseBuilder.Ask(speechText, RequestHandlerHelper.GetDefaultReprompt()); return(new OkObjectResult(response)); } }