diegosouzapw/OmniRoute · error

Failed to delete memory: ${id}

Error message

Failed to delete memory: ${id}

What it means

Error "Failed to delete memory: ${id}" thrown in diegosouzapw/OmniRoute.

Source

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

  return {
    success: true,
    data: {
      memories: limited.map((m) => memoryToPlain(m)),
      count: limited.length,
      totalTokens: limited.reduce((sum, m) => sum + Math.ceil(m.content.length / 4), 0),
    },
    context: context.apiKeyId,
  };
}

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

  await assertOwner(id, context.apiKeyId);

  const ok = await deleteMemory(id);
  if (!ok) throw new Error(`Failed to delete memory: ${id}`);

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

export const memoryBuiltinHandlers = {
  [MEMORY_SAVE_TOOL_NAME]: handleMemorySave,
  [MEMORY_UPDATE_TOOL_NAME]: handleMemoryUpdate,
  [MEMORY_SEARCH_TOOL_NAME]: handleMemorySearch,
  [MEMORY_DELETE_TOOL_NAME]: handleMemoryDelete,
} as const;

const MEMORY_SAVE_DESCRIPTION = [
  "Save a memory entry for the current API key. Creates a new entry, or updates the existing",

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/skills/memoryBuiltins.ts:153 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/3957d16aeb2625c0. Report an issue: GitHub.