{"record":{"id":"a99cedcdb4269a41","repo":"mastra-ai/mastra","slug":"processor-workflow-processor-id-failed-with-sta","errorCode":null,"errorMessage":"Processor workflow ${processor.id} failed with status: ${result.status}","messagePattern":"Processor workflow (.+?) failed with status: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"packages/server/src/server/handlers/processors.ts","lineNumber":343,"sourceCode":"          if (result.status === 'tripwire') {\n            return {\n              success: false,\n              phase,\n              tripwire: {\n                triggered: true,\n                reason: result.tripwire.reason || `Tripwire triggered in workflow ${processor.id}`,\n                metadata: result.tripwire.metadata,\n              },\n              messages,\n              messageList: {\n                messages,\n              },\n            };\n          }\n\n          // Check for execution failure\n          if (result.status !== 'success') {\n            throw new HTTPException(500, {\n              message: `Processor workflow ${processor.id} failed with status: ${result.status}`,\n            });\n          }\n\n          // Extract output from workflow result\n          const output = result.result;\n          let outputMessages = messages;\n\n          if (output && typeof output === 'object') {\n            if ('messages' in output && Array.isArray(output.messages)) {\n              outputMessages = output.messages;\n            } else if ('messageList' in output && output.messageList instanceof MessageList) {\n              outputMessages = output.messageList.get.all.db();\n            }\n          }\n\n          return {\n            success: true,","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/processors.ts#L325-L361","documentation":"When a workflow-based processor finishes a run with a status other than 'success' or 'tripwire', the execute handler converts it to HTTP 500. Possible statuses include 'failed', 'suspended', or 'paused' — anything abnormal means the processor workflow did not produce a usable output.","triggerScenarios":"POST /processors/:id/execute on a processor created via createProcessorWorkflow, where `run.start()` returns e.g. `{ status: 'failed' }` (a step threw), `{ status: 'suspended' }` (a step called suspend), or any non-success status.","commonSituations":"The processor's step throws on the synthetic input the handler builds (empty model string, empty steps arrays); the workflow has a suspend path so it pauses; a step validation error due to phase-specific inputData mismatch.","solutions":["Read the full error/status from the response and check the workflow's run trace for the failing step.","Fix the processor step logic so it succeeds with the minimal input the execute endpoint provides.","If the workflow legitimately suspends, handle 'suspended' status (resume the run) instead of relying on plain execute.","Wrap step logic to convert domain errors into tripwire aborts if they should be reported as tripwires rather than failures."],"exampleFix":"// before\nif (someCondition) throw new Error('bad input');\n// after\nif (someCondition) throw new Tripwire('bad input'); // reported as tripwire, not failed status","handlingStrategy":"try-catch","validationCode":"const detail = await fetch(`/api/processors/${processorId}`).then(r => r.json());\nif (!detail.phases.includes(phase)) {\n  console.warn(`Processor does not declare phase ${phase}; execute may fail`);\n}","typeGuard":"function isWorkflowSuccess<T>(r: { status: string } & Record<string, unknown>): r is { status: 'success'; result: T } {\n  return r.status === 'success';\n}","tryCatchPattern":"try {\n  const res = await fetch(url, options);\n  if (res.status === 500) {\n    const { message } = await res.json();\n    const m = message.match(/failed with status: (\\w+)/);\n    if (m) console.error(`Processor workflow failed, status=${m[1]}; inspect the run trace`);\n  }\n  return await res.json();\n} catch (e) {\n  console.error(e);\n  throw e;\n}","preventionTips":["Unit-test processor workflow steps with the same minimal inputData the execute endpoint sends.","Avoid suspend/pause paths in processors invoked through this endpoint, or handle them explicitly.","Wrap step failures as tripwires when they represent intentional halts.","Inspect workflow run traces in Studio when a step fails."],"tags":["mastra-server","workflow","processor","http-500"],"backgroundTag":"workflow-execution-failed","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}