-
Notifications
You must be signed in to change notification settings - Fork 263
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
Activity Failures should return activity's exception, not a TaskFailedException #314
Comments
@TsuyoshiUshio This will be the intended behavior. However, I feel some discomfort. I'd like to receive exceptions that actually occurred rather than DurableTask exception types. Examplevar option = new RetryOptions(System.TimeSpan.FromSeconds(5), 3)
{
// Dislike it
// ex is TaskFailedException or SubOrchestrationFailedException
//Handle = (ex.InnerException is HttpRequestException || ex.InnerException is SocketException)
// Like it
Handle = (ex is HttpRequestException || ex is SocketException)
}; Since it is a retrying process, I do not feel the necessity of wrapping with another Exception. |
Hi @shibayan |
In my opinion, it is possible to support by adding a custom implementation of azure-functions-durable-extension/src/WebJobs.Extensions.DurableTask/RetryOptions.cs Lines 95 to 99 in 11463dd
I want to make an optimal retry for each exception :) |
It much better than I wrote! Thank you. However, it still introduce the behavior change for the Durable Functions's side. We have a good chance to have a breaking change so, Let's wait for the Chris's reaction. :) |
Yes, this would be a breaking change. That's okay though since we are starting to plan for the 2.0 release, which is a breaking change release. We can include this change as part of 2.0. |
Hello, this is a little off topic, but not entirely... I am wondering why only support exceptions in terms of retry? It would be nice to have a handle for an exception and a handle for the actual return type... Say the Activity actually wants to intelligently handle exceptions and return some type of response and based on that response execute or don't execute retry? |
We had a similar request for something like this recently. Take a look at this issue and feel free to add comments. |
This should be tracked alongside of #313, wrapped behind a feature flag. |
I tried a feature of Custom RetryOption. However, I found an issue.
I write code like following.
I expect the lambda's parameter for the RetryOption.Handle should be FunctionFailedException. However it is TaskFailedException. I use Durable Functions v1.4.1
To Reproduce, you can use this code.
The text was updated successfully, but these errors were encountered: