MCPcopy Index your code
hub / github.com/simstudioai/sim / hasExecutionResult

Function hasExecutionResult

apps/sim/executor/utils/errors.ts:16–28  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

14 * Validates that executionResult has required fields (success, output).
15 */
16export function hasExecutionResult(error: unknown): error is ErrorWithExecutionResult {
17 if (
18 !(error instanceof Error) ||
19 !('executionResult' in error) ||
20 error.executionResult == null ||
21 typeof error.executionResult !== 'object'
22 ) {
23 return false
24 }
25
26 const result = error.executionResult as Record<string, unknown>
27 return typeof result.success === 'boolean' && result.output != null
28}
29
30/**
31 * Attaches an ExecutionResult to an error for propagation to parent workflows.

Callers 10

finalizeExecutionErrorFunction · 0.90
runResumeExecutionMethod · 0.90
buildExecutionErrorFunction · 0.90
handleExecutionErrorFunction · 0.90
handleExecutePostFunction · 0.90
startFunction · 0.90
executeWorkflowJobFunction · 0.90
runWorkflowExecutionFunction · 0.90
executeCoreMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected