diegosouzapw/OmniRoute · error

Missing required field: key

Error message

Missing required field: key

What it means

Error "Missing required field: key" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/skills/memoryBuiltins.ts:62

  return {
    id: memory.id,
    type: memory.type,
    key: memory.key,
    content: memory.content,
    metadata: memory.metadata,
    createdAt: memory.createdAt.toISOString(),
    updatedAt: memory.updatedAt.toISOString(),
  };
}

async function handleMemorySave(input: Record<string, unknown>, context: { apiKeyId: string; sessionId: string }) {
  const { type, key, content, metadata } = input as {
    type?: string;
    key: string;
    content: string;
    metadata?: Record<string, unknown>;
  };
  if (!key || typeof key !== "string") throw new Error("Missing required field: key");
  if (!content || typeof content !== "string") throw new Error("Missing required field: content");

  const saved = await createMemory({
    apiKeyId: context.apiKeyId,
    sessionId: context.sessionId || "",
    type: toMemoryType(type),
    key,
    content,
    metadata: metadata && typeof metadata === "object" ? metadata : {},
    expiresAt: null,
  });

  return {
    success: true,
    memory: memoryToPlain(saved),
    message: "Memory saved successfully",
    context: context.apiKeyId,
  };

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/skills/memoryBuiltins.ts:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/73b191d77eb45fc4. Report an issue: GitHub.