mastra-ai/mastra · error · HTTPException

Editor is not configured

Error message

Editor is not configured

What it means

The processor-providers handler calls `mastra.getEditor()`; when the Mastra instance was constructed without an editor configuration it throws a 500 'Editor is not configured'. The editor (which supplies processor providers) is an optional server capability, so its absence is a server configuration issue rather than a client error.

Source

Thrown at packages/server/src/server/handlers/processor-providers.ts:34

/**
 * GET /processor-providers - List all registered processor providers
 */
export const LIST_PROCESSOR_PROVIDERS_ROUTE = createRoute({
  method: 'GET',
  path: '/processor-providers',
  responseType: 'json',
  responseSchema: getProcessorProvidersResponseSchema,
  summary: 'List processor providers',
  description: 'Returns a list of all registered processor providers with their info and available phases',
  tags: ['Processor Providers'],
  requiresAuth: true,
  handler: async ({ mastra }) => {
    try {
      const editor = mastra.getEditor();

      if (!editor) {
        throw new HTTPException(500, { message: 'Editor is not configured' });
      }

      const providers = editor.getProcessorProviders();

      return {
        providers: Object.values(providers).map(provider => ({
          ...provider.info,
          availablePhases: provider.availablePhases,
        })),
      };
    } catch (error) {
      return handleError(error, 'Error listing processor providers');
    }
  },
});

/**
 * GET /processor-providers/:providerId - Get a specific processor provider with config schema

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Configure an editor on the Mastra instance (pass the editor option in `new Mastra({ ... })`).
  2. Install the editor/processor-provider package if it was omitted from production dependencies.
  3. Hide/disable the processor-providers UI when the server reports the editor is unconfigured.
  4. Check getEditor() availability at startup and surface a clear config error early.

Example fix

// before
new Mastra({ agents: {...} }); // no editor
// after
import { myEditor } from './editor';
new Mastra({ agents: {...}, editor: myEditor });
Defensive patterns

Strategy: fallback

Validate before calling

const health = await fetch('/api/processor-providers');
if (health.status === 500) console.warn('Editor not configured on this Mastra server');

Type guard

function hasEditor(mastra: unknown): mastra is { getEditor(): object } {
  const m = mastra as any;
  return !!m && typeof m.getEditor === 'function' && !!m.getEditor();
}

Try / catch

try {
  return await getProcessorProviders();
} catch (e) {
  if (e.status === 500 && e.message.includes('Editor is not configured')) {
    return { providers: [], editorEnabled: false }; // degrade gracefully
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling GET /api/processor-providers (or related editor endpoints) against a Mastra server whose `new Mastra({ ... })` config omitted the editor option, or where getEditor() returns undefined because editor dependencies weren't installed/configured.

Common situations: Deploying a minimal Mastra config and the Studio UI still requests editor endpoints; editor package not installed in production builds; editor config removed during a refactor; environment where the editor is intentionally disabled but UI probes it anyway.

Related errors


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