fix(worker): wrap MergeAbortAsync in AbortMergeAsync for consistent error handling

This commit is contained in:
mika kuns
2026-04-24 15:51:40 +02:00
parent 6d460ea996
commit ada4d9fd9b

View File

@@ -216,7 +216,8 @@ public sealed class TaskMergeService
if (!await _git.IsMidMergeAsync(list.WorkingDir, ct)) if (!await _git.IsMidMergeAsync(list.WorkingDir, ct))
return Blocked("repo is not mid-merge"); return Blocked("repo is not mid-merge");
await _git.MergeAbortAsync(list.WorkingDir, ct); try { await _git.MergeAbortAsync(list.WorkingDir, ct); }
catch (Exception ex) { return Blocked($"abort failed: {ex.Message}"); }
_logger.LogInformation("Aborted merge of task {TaskId}", taskId); _logger.LogInformation("Aborted merge of task {TaskId}", taskId);
return new MergeResult(StatusAborted, Array.Empty<string>(), null); return new MergeResult(StatusAborted, Array.Empty<string>(), null);