Skip to content

Commit a692cc6

Browse files
committed
initial commit
1 parent 04a5aac commit a692cc6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Abstractions/TaskFailureDetails.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Reflection;
66
using CoreFailureDetails = DurableTask.Core.FailureDetails;
77
using CoreOrchestrationException = DurableTask.Core.Exceptions.OrchestrationException;
8+
using CoreSubOrchestrationFailedException = DurableTask.Core.Exceptions.SubOrchestrationFailedException;
89

910
namespace Microsoft.DurableTask;
1011

@@ -154,7 +155,7 @@ internal CoreFailureDetails ToCoreFailureDetails()
154155
return null;
155156
}
156157

157-
if (exception is CoreOrchestrationException coreEx)
158+
if (exception is CoreOrchestrationException coreEx && exception is not CoreSubOrchestrationFailedException)
158159
{
159160
return new TaskFailureDetails(
160161
coreEx.FailureDetails?.ErrorType ?? "(unknown)",

src/Worker/Core/Shims/TaskOrchestrationContextWrapper.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,7 @@ public override async Task<TResult> CallSubOrchestratorAsync<TResult>(
198198
catch (global::DurableTask.Core.Exceptions.SubOrchestrationFailedException e)
199199
{
200200
// Hide the core DTFx types and instead use our own
201-
throw new TaskFailedException(
202-
orchestratorName,
203-
e.ScheduleId,
204-
TaskFailureDetails.FromCoreFailureDetails(e.FailureDetails!));
201+
throw new TaskFailedException(orchestratorName, e.ScheduleId, e);
205202
}
206203
}
207204

0 commit comments

Comments
 (0)