Improve workflow error messaging
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user