Skip to content

Conversation

nytian
Copy link
Collaborator

@nytian nytian commented Oct 7, 2025

Issue describing the changes in this PR

Add support for including exception properties at TaskFailureDetails via custom provider

Note: This PR won't work unless microsoft/durabletask-dotnet#474 is merged.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v2.x branch.
    • Otherwise: This change applies exclusively to WebJobs.Extensions.DurableTask v3.x. It will be retained only in the dev and main branches and will not be merged into the v2.x branch.

Copy link
Collaborator

@andystaples andystaples left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking mostly good - just one thing to discuss

return false;
}

public static IDictionary<string, object?> TryExtractPropertiesFromExceptionJson(string json)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally methods beginning with "Try" should return a bool representing if the operation was successful, and the parsed result as an "out" parameter.
I'm also a bit concerned about exception handling here - if "json" is not a valid json string, JsonNode.Parse() will throw. Can we add try/catch around the contents of this method and just return false if an exception is thrown?

// Call the activity that will throw an exception
try
{
await context.CallActivityAsync(nameof(BusinessActivity));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we correct the warning here? Should just need to pass an input or change the return type of BuisnessActivity

@nytian nytian marked this pull request as draft October 14, 2025 17:48
@nytian nytian marked this pull request as ready for review October 15, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants