You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original message of the exception should be available in the ex.InnerException.Message property.
Actual behavior
Content of the ex.InnerException.Message property is always
Exception of type 'System.Net.Http.HttpRequestException' was thrown.
Relevant source code snippets
[FunctionName("DurableFunction")]publicstaticasyncTask<List<string>>RunOrchestrator([OrchestrationTrigger]DurableOrchestrationContextcontext ILogger log){
...
try
{
outputs.Add(await context.CallActivityAsync<string>("DurableFunction_Hello","London"));}
catch (FunctionFailedException ex){//at that point, ex.InnerException.Message is no longer the original content}
...}[FunctionName("DurableFunction_Hello")]
public static string SayHello([ActivityTrigger]stringname,ILoggerlog){thrownew HttpRequestException("This is the message of my original HttpRequestException....");}
Known workarounds
Provide a description of any known workarounds you used.
App Details
Durable Functions extension version (e.g. v1.8.3): v1.8.3
Azure Functions runtime version (1.0 or 2.0): v2.0.12555.0
Programming language used: C#/dotnet
The text was updated successfully, but these errors were encountered:
Hi,
I just hit this issue when testing durable functions. The FunctionFailedException that is caught by the orchestrator has an inner exception of the right type, but as mentioned by @ggirard07, the message and stack trace are not retained. @cgillum Are there any plans to change this behavior to retain the original contents of the exception thrown by the Activity?
The workaround that I'm considering is having the Activities return an object indicating success/failure, along with the exception.
Thank you!
Description
HttpRequestException thrown from an activity does not contain the original exception message when caught in the orchestrator.
I made a sample app to demonstrate the issue: https://github.com/ggirard07/DurableFunctionWithHttpRequestException
Expected behavior
Original message of the exception should be available in the
ex.InnerException.Message
property.Actual behavior
Content of the
ex.InnerException.Message
property is alwaysRelevant source code snippets
Known workarounds
App Details
The text was updated successfully, but these errors were encountered: