Improve workflow error messaging

This commit is contained in:
2026-03-09 23:51:37 -04:00
parent fa2de3e259
commit f2c25fb9c6
11 changed files with 272 additions and 41 deletions

View File

@@ -216,13 +216,15 @@ function buildStatusLine(task: TaskCore, progress: TaskNotificationView['progres
case 'completed':
return 'Finished successfully';
case 'failed':
return 'Failed';
return task.stage !== 'failed'
? `Failed during ${stageLabel(task.stage).toLowerCase()}`
: 'Failed';
}
}
export function buildTaskNotification(task: TaskCore): TaskNotificationView {
const progress = buildProgress(task);
const detailLine = task.error ?? task.stage_detail;
const detailLine = task.stage_detail ?? task.error;
return {
title: taskTypeLabel(task.task_type),