Azure / durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
Apache License 2.0
1.47k stars 287 forks source link

Add TaskContext null check in AsyncTaskActivity error handling #1055

Closed leoquijano closed 3 months ago

leoquijano commented 3 months ago

This PR adds a null check during error handling in AsyncTaskActivity. As described in #1054, if the context parameter is passed as null to RunAsync, and the call to ExecuteAsync fails for some task-specific reason, the error handling code uses that parameter to check which error propagation mode is being used. If the parameter is null, an unexpected NullReferenceException will be raised, instead of the expected TaskFailureException.

A null check is added to prevent this from happening.

cgillum commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
EDIT: Azure Pipelines run started successfully.