File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,7 @@ export async function executeWorkflowWithFullLogging(
492492 if ( ! response . ok ) {
493493 const error = await response . json ( )
494494 const errorMessage = error . error || 'Workflow execution failed'
495+ const isValidationError = response . status >= 400 && response . status < 500
495496 const now = new Date ( ) . toISOString ( )
496497 addConsole ( {
497498 input : { } ,
@@ -503,10 +504,10 @@ export async function executeWorkflowWithFullLogging(
503504 executionOrder : 0 ,
504505 endedAt : now ,
505506 workflowId : wfId ,
506- blockId : 'execution-error' ,
507+ blockId : isValidationError ? 'validation' : 'execution-error' ,
507508 executionId,
508- blockName : 'Execution Error' ,
509- blockType : 'error' ,
509+ blockName : isValidationError ? 'Workflow Validation' : 'Execution Error' ,
510+ blockType : isValidationError ? 'validation' : 'error' ,
510511 } )
511512 throw new Error ( errorMessage )
512513 }
You can’t perform that action at this time.
0 commit comments