Hi KentWeareMSFT,
I am currently using logicapp with custom code in my project and I found that if we send http response / any other way to send exception status and exception message from custom code to logic app it does not reflect in the output.
I tried returning both Task.FromResult(object) and Task.FromException(Exception)
Task.FromResult(TResult) returns custom object without issues but it is not capable of returning correct status when something failed in the code.
Task.FromException(Exception) - It does return failed status but it is not capable of returning custom object. Can someone provide me solution something similar to below code which we can use?
public async Task<IActionResult> Run()
{
try
{
// code
return new OkObjectResult(customObject);
}
catch (Exception e)
{
return BadRequest(new { message = e.Message }); // Anything similar for this??
}
}