Skip to content

Commit

Permalink
Include status reason in build message
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Sep 18, 2023
1 parent df8b79a commit cf17e19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/SIL.Machine.AspNetCore/Models/ClearMLTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class ClearMLTask
public ClearMLProject Project { get; set; } = default!;
public ClearMLTaskStatus Status { get; set; }
public string StatusReason { get; set; } = default!;
public string StatusMessage { get; set; } = default!;
public int LastIteration { get; set; }
public int ActiveDuration { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ await _engines.UpdateAsync(
);
throw new OperationCanceledException();
case ClearMLTaskStatus.Failed:
throw new InvalidOperationException(clearMLTask.StatusReason);
throw new InvalidOperationException(
$"{clearMLTask.StatusReason} : {clearMLTask.StatusMessage}"
);
}
if (clearMLTask.Status is ClearMLTaskStatus.Completed)
break;
Expand Down

0 comments on commit cf17e19

Please sign in to comment.