Skip to content

Commit 296d4e2

Browse files
CopilotYunchuWang
andcommitted
Address code review feedback: fix typo, improve recursion, add serialization
Co-authored-by: YunchuWang <[email protected]>
1 parent 30de2aa commit 296d4e2

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/Abstractions/DurableTaskCoreExceptionsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static class DurableTaskCoreExceptionsExtensions
5454
failureDetails.ErrorType,
5555
failureDetails.ErrorMessage,
5656
failureDetails.StackTrace,
57-
failureDetails.InnerFailure?.ToTaskFailureDetails(actualException),
57+
failureDetails.InnerFailure?.ToTaskFailureDetails(actualException?.InnerException),
5858
failureDetails.Properties)
5959
{
6060
OriginalException = actualException,

src/Abstractions/TaskFailureDetails.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ internal CoreFailureDetails ToCoreFailureDetails()
182182
};
183183
}
184184

185-
// might need to udpate this later
185+
// might need to update this later
186186
return new TaskFailureDetails(
187187
exception.GetType().ToString(),
188188
exception.Message,

test/Grpc.IntegrationTests/OrchestrationErrorHandling.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,13 @@ public ApiException(int statusCode, string message)
974974
protected ApiException(SerializationInfo info, StreamingContext context)
975975
: base(info, context)
976976
{
977+
this.StatusCode = info.GetInt32(nameof(this.StatusCode));
978+
}
979+
980+
public override void GetObjectData(SerializationInfo info, StreamingContext context)
981+
{
982+
base.GetObjectData(info, context);
983+
info.AddValue(nameof(this.StatusCode), this.StatusCode);
977984
}
978985
#pragma warning restore SYSLIB0051
979986
}

0 commit comments

Comments
 (0)