Improve workflow error messaging
This commit is contained in:
@@ -8,7 +8,7 @@ import type {
|
||||
export type StageTimelineItem = {
|
||||
stage: TaskStage;
|
||||
label: string;
|
||||
state: 'completed' | 'active' | 'pending';
|
||||
state: 'completed' | 'active' | 'pending' | 'failed';
|
||||
detail: string | null;
|
||||
timestamp: string | null;
|
||||
context: Task['stage_context'] | null;
|
||||
@@ -203,7 +203,7 @@ export function buildStageTimeline(task: Task, events: TaskStageEvent[]): StageT
|
||||
return {
|
||||
stage,
|
||||
label: stageLabel(stage),
|
||||
state: 'completed' as const,
|
||||
state: task.status === 'failed' && stage === task.stage ? 'failed' as const : 'completed' as const,
|
||||
detail: event?.stage_detail ?? task.stage_detail,
|
||||
timestamp: event?.created_at ?? task.finished_at,
|
||||
context: event?.stage_context ?? (stage === task.stage ? task.stage_context : null) ?? null
|
||||
|
||||
Reference in New Issue
Block a user