Skip to content

Commit 7320bad

Browse files
YunchuWangCopilot
andauthored
Update samples/ExceptionPropertiesSample/Tasks.cs
Co-authored-by: Copilot <[email protected]>
1 parent 41ee817 commit 7320bad

File tree

1 file changed

+2
-11
lines changed
  • samples/ExceptionPropertiesSample

1 file changed

+2
-11
lines changed

samples/ExceptionPropertiesSample/Tasks.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,8 @@ public class ValidationOrchestration : TaskOrchestrator<string, string>
1414
public override async Task<string> RunAsync(TaskOrchestrationContext context, string input)
1515
{
1616
// Call an activity that may throw a custom exception with properties
17-
try
18-
{
19-
string result = await context.CallActivityAsync<string>("ValidateInput", input);
20-
return result;
21-
}
22-
catch (TaskFailedException)
23-
{
24-
// The failure details will include custom properties from IExceptionPropertiesProvider
25-
// These properties are automatically extracted and included in the TaskFailureDetails
26-
throw;
27-
}
17+
string result = await context.CallActivityAsync<string>("ValidateInput", input);
18+
return result;
2819
}
2920
}
3021

0 commit comments

Comments
 (0)