{"record":{"id":"d4be25c921697048","repo":"mastra-ai/mastra","slug":"processor-not-found","errorCode":null,"errorMessage":"Processor not found","messagePattern":"Processor not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"warning","filePath":"packages/server/src/server/handlers/processors.ts","lineNumber":161,"sourceCode":"  responseSchema: serializedProcessorDetailSchema,\n  summary: 'Get processor by ID',\n  description: 'Returns details for a specific processor including its phases and configurations',\n  tags: ['Processors'],\n  requiresAuth: true,\n  handler: async ({ mastra, processorId }) => {\n    try {\n      // Get the processor from Mastra's registered processors\n      let processorEntry: Processor | ProcessorWorkflow | undefined;\n      try {\n        processorEntry = mastra.getProcessorById(processorId) as Processor | ProcessorWorkflow;\n      } catch {\n        // getProcessorById throws if not found, try by key\n        const processors = mastra.listProcessors() || {};\n        processorEntry = processors[processorId as keyof typeof processors] as Processor | ProcessorWorkflow;\n      }\n\n      if (!processorEntry) {\n        throw new HTTPException(404, { message: 'Processor not found' });\n      }\n\n      // Check if it's a workflow processor\n      const isWorkflow = isProcessorWorkflow(processorEntry);\n\n      // Detect phases (handles both individual processors and workflow processors)\n      const phases = detectProcessorPhases(processorEntry);\n\n      // Get agent configurations for this processor\n      const configs = mastra.getProcessorConfigurations(processorId);\n      const agents = mastra.listAgents() || {};\n      const configurations = configs.map(c => ({\n        agentId: c.agentId,\n        agentName: agents[c.agentId]?.name || c.agentId,\n        type: c.type,\n      }));\n\n      return {","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/processors.ts#L143-L179","documentation":"GET /processors/:processorId throws this HTTP 404 when neither `mastra.getProcessorById(processorId)` nor a lookup by key in `mastra.listProcessors()` finds a processor. The handler tries both strategies before concluding the processor is not registered on the Mastra instance.","triggerScenarios":"GET /processors/:processorId with a processorId that is neither a registered processor id nor a key in the processors map — e.g. processor never passed to `new Mastra({ processors })`, removed, or the id in the URL is wrong.","commonSituations":"Typo in the processor id; processor registered on a different Mastra instance/environment than the server is running; renamed processor with stale client references; pointing the playground at a project that registers no processors.","solutions":["Call GET /processors to list registered processors and confirm the exact id.","Register the processor in the Mastra constructor: `new Mastra({ processors: { myProcessor } })`.","Verify the server you are querying runs the same Mastra instance that registers the processor.","Fix any id mismatch between the processor's `id` property and the registry key used in the processors map."],"exampleFix":"// before\nnew Mastra({ agents });\n// after\nnew Mastra({ agents, processors: { 'pii-redactor': new PiiRedactor() } });","handlingStrategy":"validation","validationCode":"const processors = await fetch('/api/processors').then(r => r.json());\nif (!processors[processorId]) {\n  throw new Error(`Processor ${processorId} is not registered. Available: ${Object.keys(processors).join(', ')}`);\n}","typeGuard":"function processorExists(registry: Record<string, unknown>, id: string): id is string {\n  return Object.prototype.hasOwnProperty.call(registry, id);\n}","tryCatchPattern":"try {\n  const res = await fetch(`/api/processors/${processorId}`);\n  if (res.status === 404) {\n    const available = await fetch('/api/processors').then(r => r.json());\n    throw new Error(`Unknown processor. Available: ${Object.keys(available).join(', ')}`);\n  }\n  return await res.json();\n} catch (e) {\n  console.error(e);\n  return null;\n}","preventionTips":["Register processors in the Mastra constructor and export the ids as shared constants.","List processors via GET /processors before fetching details by id.","Keep the playground pointed at the Mastra instance that registers your processors."],"tags":["mastra-server","not-found","processor","http-404"],"backgroundTag":"resource-not-found","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}