Failed to deserialize exception from TaskActivity
See original GitHub issueMicrosoft.Azure.WebJobs.Extensions.DurableTask v1.6.2
Issue
If you have an orchestrator call a sub orchestrator and that sub orchestrator calls an activity function which throws an exception, then the exception cannot be deserialised and you get “Failed to deserialize exception from TaskActivity”
Easy to reproduce like this:
public class MyOrchestrator
{
[FunctionName("MyTimer")]
public static async Task RunTimerAsync([TimerTrigger("0 */5 * * * *", RunOnStartup = true)]TimerInfo myTimer, [OrchestrationClient]DurableOrchestrationClient orchestrationClient, ILogger log)
{
log.LogInformation($"Executing");
string instanceId = await orchestrationClient.StartNewAsync("MyOrchestrator", "Test");
}
[FunctionName("MyOrchestrator")]
public static async Task RunOrchestratorAsync([OrchestrationTrigger] DurableOrchestrationContext context, ILogger logger)
{
try
{
await context.CallSubOrchestratorAsync("MySubOrchestrator", "Booooo");
}
catch (Exception ex)
{
//The exception here is Failed to deserialize exception from TaskActivity:
}
}
[FunctionName("MySubOrchestrator")]
public static async Task RunSubOrchestratorAsync([OrchestrationTrigger] DurableOrchestrationContext context, ILogger logger)
{
await context.CallActivityAsync("MyActivityFunction", "Booooo");
}
[FunctionName("MyActivityFunction")]
public static void RunActivityFunction([ActivityTrigger] DurableActivityContext context, ILogger logger)
{
throw new Exception("WTF");
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:7
Top Results From Across the Web
json - Azure Durable Functions How should I handle ...
When I throw it from activity function I'm not getting error saying "Failed to deserialize exception from TaskActivity".
Read more >Failed to deserialize exception from TaskActivity
We are seeing an increasing number of builds failing (after all steps complete successfully) with the following error: Failed to deserialize ...
Read more >Handling errors in Durable Functions (Azure Functions)
Any exception that is thrown in an activity function is marshaled back to the orchestrator function and thrown as a FunctionFailedException .
Read more >Azure Durable Functions How should I handle ...
When I throw it from activity function I'm not getting error saying "Failed to deserialize exception from TaskActivity". Tomasz Kaniewski 1007.
Read more >Create Form Task - Unable to deserialize the response
I am trying to create a form task to take input from the user using the UiPath Action Center but during executing the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

please fix this!
I see this issue has received a lot of votes! I’ll take a look and see if we can get a fix in for the next release.