mastra-ai/mastra · error · HTTPException

Processor workflow ${processor.id} failed with status: ${res

Error message

Processor workflow ${processor.id} failed with status: ${result.status}

What it means

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.

Source

Thrown at packages/server/src/server/handlers/processors.ts:343

          if (result.status === 'tripwire') {
            return {
              success: false,
              phase,
              tripwire: {
                triggered: true,
                reason: result.tripwire.reason || `Tripwire triggered in workflow ${processor.id}`,
                metadata: result.tripwire.metadata,
              },
              messages,
              messageList: {
                messages,
              },
            };
          }

          // Check for execution failure
          if (result.status !== 'success') {
            throw new HTTPException(500, {
              message: `Processor workflow ${processor.id} failed with status: ${result.status}`,
            });
          }

          // Extract output from workflow result
          const output = result.result;
          let outputMessages = messages;

          if (output && typeof output === 'object') {
            if ('messages' in output && Array.isArray(output.messages)) {
              outputMessages = output.messages;
            } else if ('messageList' in output && output.messageList instanceof MessageList) {
              outputMessages = output.messageList.get.all.db();
            }
          }

          return {
            success: true,

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Read the full error/status from the response and check the workflow's run trace for the failing step.
  2. Fix the processor step logic so it succeeds with the minimal input the execute endpoint provides.
  3. If the workflow legitimately suspends, handle 'suspended' status (resume the run) instead of relying on plain execute.
  4. Wrap step logic to convert domain errors into tripwire aborts if they should be reported as tripwires rather than failures.

Example fix

// before
if (someCondition) throw new Error('bad input');
// after
if (someCondition) throw new Tripwire('bad input'); // reported as tripwire, not failed status
Defensive patterns

Strategy: try-catch

Validate before calling

const detail = await fetch(`/api/processors/${processorId}`).then(r => r.json());
if (!detail.phases.includes(phase)) {
  console.warn(`Processor does not declare phase ${phase}; execute may fail`);
}

Type guard

function isWorkflowSuccess<T>(r: { status: string } & Record<string, unknown>): r is { status: 'success'; result: T } {
  return r.status === 'success';
}

Try / catch

try {
  const res = await fetch(url, options);
  if (res.status === 500) {
    const { message } = await res.json();
    const m = message.match(/failed with status: (\w+)/);
    if (m) console.error(`Processor workflow failed, status=${m[1]}; inspect the run trace`);
  }
  return await res.json();
} catch (e) {
  console.error(e);
  throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/a99cedcdb4269a41. Report an issue: GitHub.