Skip to content

Commit

Permalink
fix: properly fill error in gRPC TaskSummary object (#792)
Browse files Browse the repository at this point in the history
# Motivation

Error message was not available in TaskSummary object when task is in
Retried Status while it is available in TaskDetailed.

# Description

Change conversion from TaskDataHolder to gRPC TaskSummary object to fill
in the error message when it is available instead of only during errors.

# Testing

GUI shows the error message when it shows TaskSummary objects

# Impact

Debugging informations are easier to access in the GUI.

# Checklist

- [x] My code adheres to the coding and style guidelines of the project.
- [x] I have performed a self-review of my code.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have made corresponding changes to the documentation.
- [x] I have thoroughly tested my modifications and added tests when
necessary.
- [x] Tests pass locally and in the CI.
- [x] I have assessed the performance impact of my modifications.
  • Loading branch information
aneojgurhem authored Nov 14, 2024
2 parents 470c8f5 + b5b7488 commit 3a100f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Common/src/gRPC/Convertors/TaskDataHolderExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ public static TaskSummary ToTaskSummary(this TaskDataHolder taskDataSummary)
StartedAt = taskDataSummary.StartDate is not null
? FromDateTime(taskDataSummary.StartDate.Value)
: null,
Error = taskDataSummary.Status == TaskStatus.Error
? taskDataSummary.Output?.Error
: "",
Error = taskDataSummary.Output?.Error ?? string.Empty,
StatusMessage = taskDataSummary.StatusMessage,
SubmittedAt = taskDataSummary.SubmittedDate is not null
? FromDateTime(taskDataSummary.SubmittedDate.Value)
Expand Down

0 comments on commit 3a100f2

Please sign in to comment.