Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Distinguish errors from 5xxs
  • Loading branch information
Theodore Li committed Mar 17, 2026
commit 9762bbaaae7293bc0ce5b99a7d73f665a45109de
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ export async function executeWorkflowWithFullLogging(
if (!response.ok) {
const error = await response.json()
const errorMessage = error.error || 'Workflow execution failed'
const isValidationError = response.status >= 400 && response.status < 500
const now = new Date().toISOString()
addConsole({
input: {},
Expand All @@ -503,10 +504,10 @@ export async function executeWorkflowWithFullLogging(
executionOrder: 0,
endedAt: now,
workflowId: wfId,
blockId: 'execution-error',
blockId: isValidationError ? 'validation' : 'execution-error',
executionId,
blockName: 'Execution Error',
blockType: 'error',
blockName: isValidationError ? 'Workflow Validation' : 'Execution Error',
blockType: isValidationError ? 'validation' : 'error',
})
throw new Error(errorMessage)
}
Expand Down
Loading