diegosouzapw/OmniRoute · error

No fields to update

Error message

No fields to update

What it means

Error "No fields to update" thrown in diegosouzapw/OmniRoute.

Source

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

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

  await assertOwner(id, context.apiKeyId);

  const updates: Record<string, unknown> = {};
  if (type !== undefined) updates.type = toMemoryType(type);
  if (key !== undefined) updates.key = key;
  if (content !== undefined) updates.content = content;
  if (metadata !== undefined) updates.metadata = metadata;

  if (Object.keys(updates).length === 0) throw new Error("No fields to update");

  const ok = await updateMemory(id, updates);
  if (!ok) throw new Error(`Failed to update memory: ${id}`);

  return {
    success: true,
    id,
    message: "Memory updated successfully",
    context: context.apiKeyId,
  };
}

async function handleMemorySearch(input: Record<string, unknown>, context: { apiKeyId: string }) {
  const { query, type, limit, maxTokens } = input as {
    query?: string;
    type?: string;
    limit?: number;
    maxTokens?: number;

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/skills/memoryBuiltins.ts:101 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/9cc86ee881ba7649. Report an issue: GitHub.