-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub-orchestration's FunctionFailedException.InnerException is null #643
Comments
Do you get the same behavior with any other exception type? I wonder if |
InnerException is null no matter what type of exception I throw. |
We are calling context.CallSubOrchestratorAsync and the exception is thrown in the sub-orchestration, does the behavior differ for activity and sub-orchestration? |
We are using Functions 2.0 and azure-functions-durable-extension 1.7.1 |
I created the following test case orchestrator function to see whether this is reproduceable in the latest code: public static async Task SubOrchestrationThrow([OrchestrationTrigger] DurableOrchestrationContext ctx)
{
string message = ctx.GetInput<string>();
try
{
await ctx.CallSubOrchestratorAsync(nameof(TestOrchestrations.ThrowOrchestrator), message);
}
catch (FunctionFailedException e)
{
if (e.InnerException == null ||
e.GetBaseException().GetType() != typeof(InvalidOperationException) ||
!e.InnerException.Message.Contains(message))
{
throw new Exception("InnerException was not the expected value.");
}
// rethrow the original exception
throw;
}
} The code worked as expected and the inner-exception was not null. I think for now we can assume that if there was an issue in v1.7.1 that it is fixed in v1.8.0. |
Resolved with v1.8.0 release. |
Thanks Chris, I don't see the bug in 1.8 version |
Issue
I am throwing TaskCanceledException() from the action to the orchestrator and expecting FunctionFailedException.InnerException to have the exception, instead it has null.
Expected
FunctionFailedException.InnerException should have TaskCanceledException().
Additional Details
In action
throw new TaskCanceledException();
In Orchestrator
catch (Exception ex)
{
The text was updated successfully, but these errors were encountered: