{"record":{"id":"3957d16aeb2625c0","repo":"diegosouzapw/OmniRoute","slug":"failed-to-delete-memory-id","errorCode":null,"errorMessage":"Failed to delete memory: ${id}","messagePattern":"Failed to delete memory: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/skills/memoryBuiltins.ts","lineNumber":153,"sourceCode":"  return {\n    success: true,\n    data: {\n      memories: limited.map((m) => memoryToPlain(m)),\n      count: limited.length,\n      totalTokens: limited.reduce((sum, m) => sum + Math.ceil(m.content.length / 4), 0),\n    },\n    context: context.apiKeyId,\n  };\n}\n\nasync function handleMemoryDelete(input: Record<string, unknown>, context: { apiKeyId: string }) {\n  const { id } = input as { id: string };\n  if (!id || typeof id !== \"string\") throw new Error(\"Missing required field: id\");\n\n  await assertOwner(id, context.apiKeyId);\n\n  const ok = await deleteMemory(id);\n  if (!ok) throw new Error(`Failed to delete memory: ${id}`);\n\n  return {\n    success: true,\n    id,\n    message: \"Memory deleted successfully\",\n    context: context.apiKeyId,\n  };\n}\n\nexport const memoryBuiltinHandlers = {\n  [MEMORY_SAVE_TOOL_NAME]: handleMemorySave,\n  [MEMORY_UPDATE_TOOL_NAME]: handleMemoryUpdate,\n  [MEMORY_SEARCH_TOOL_NAME]: handleMemorySearch,\n  [MEMORY_DELETE_TOOL_NAME]: handleMemoryDelete,\n} as const;\n\nconst MEMORY_SAVE_DESCRIPTION = [\n  \"Save a memory entry for the current API key. Creates a new entry, or updates the existing\",","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/skills/memoryBuiltins.ts#L135-L171","documentation":"Error \"Failed to delete memory: ${id}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/skills/memoryBuiltins.ts:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}