-
Notifications
You must be signed in to change notification settings - Fork 280
Include Exception Properties at FailureDetails via Custom Provider #3215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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
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
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs
dev
andmain
branches and will not be merged into thev2.x
branch.