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
In #2697 it is explained that activity exceptions will not be serialized.
With this decision, how are we supposed to implement custom retry handlers when there is no useful information to act upon?
I have a scenario where I call an Sql Database where timeouts are expected due to cold starts. I want to retry in these circumstances, but not anywhere else. I also do not want to litter my orchestration with try...catch, which needs their own workarounds also explained in #2476.
As an example, I have a test activity throwing a TimeoutException and a custom retry handler implemented with TaskOptions.FromRetryHandler:
vartaskOptions=TaskOptions.FromRetryHandler(async retryContext =>{// Actual exception in debugger:// TaskFailedException: The operation has timed out.// InnerException: null// FailureDetails: same as retryContext.LastFailure// retryContext.LastFailure: // ErrorMessage: "One or more errors occurred. (The operation has timed out.)"// ErrorType: "System.AggregateException"// InnerFailure: nullreturnfalse;// not a useful result});
RetryContext contains no useful information. I cannot reliably depend on the error message from an AggregateException.
In this case it it no use to add a try...catch in my orchestration, as the exception thrown is a TaskFailedException with just as little information.
The text was updated successfully, but these errors were encountered:
In #2697 it is explained that activity exceptions will not be serialized.
With this decision, how are we supposed to implement custom retry handlers when there is no useful information to act upon?
I have a scenario where I call an Sql Database where timeouts are expected due to cold starts. I want to retry in these circumstances, but not anywhere else. I also do not want to litter my orchestration with
try...catch
, which needs their own workarounds also explained in #2476.As an example, I have a test activity throwing a
TimeoutException
and a custom retry handler implemented withTaskOptions.FromRetryHandler
:RetryContext
contains no useful information. I cannot reliably depend on the error message from anAggregateException
.In this case it it no use to add a
try...catch
in my orchestration, as the exception thrown is aTaskFailedException
with just as little information.The text was updated successfully, but these errors were encountered: