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

Function workflowHasResponseBlock

apps/sim/lib/workflows/utils.ts:278–290  ·  view source on GitHub ↗
(
  executionResult: Pick<ExecutionResult, 'success' | 'logs'>
)

Source from the content-addressed store, hash-verified

276}
277
278export const workflowHasResponseBlock = (
279 executionResult: Pick<ExecutionResult, 'success' | 'logs'>
280): boolean => {
281 if (!executionResult?.logs || !Array.isArray(executionResult.logs) || !executionResult.success) {
282 return false
283 }
284
285 const responseBlock = executionResult.logs.find(
286 (log) => log?.blockType === 'response' && log?.success
287 )
288
289 return responseBlock !== undefined
290}
291
292export const createHttpResponseFromBlock = async (
293 executionResult: Pick<ExecutionResult, 'output'>,

Callers 2

handleExecutePostFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected