{"record":{"id":"a9f0879a23810eb2","repo":"chroma-core/chroma","slug":"transactional-delete-for-id-id-requires-a-pri","errorCode":null,"errorMessage":"transactional delete for id \"${id}\" requires a prior read proving the id is present","messagePattern":"transactional delete for id \"(.+?)\" requires a prior read proving the id is present","errorType":"validation","errorClass":"ChromaValueError","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/chromadb/src/collection.ts","lineNumber":1729,"sourceCode":"    }\n  }\n\n  private validateWritePrecondition(\n    operation: ConditionalTransactionOperationPayload[\"operation\"],\n    id: string,\n  ): void {\n    if (operation === \"add\" && !this.knownAbsent.has(id)) {\n      throw new ChromaValueError(\n        `transactional add for id \"${id}\" requires a prior read proving the id is absent`,\n      );\n    }\n    if (operation === \"update\" && !this.knownPresent.has(id)) {\n      throw new ChromaValueError(\n        `transactional update for id \"${id}\" requires a prior read proving the id is present`,\n      );\n    }\n    if (operation === \"delete\" && !this.knownPresent.has(id)) {\n      throw new ChromaValueError(\n        `transactional delete for id \"${id}\" requires a prior read proving the id is present`,\n      );\n    }\n  }\n\n  private ensureOpen(): void {\n    if (this.closed) {\n      throw new ChromaValueError(\"conditional transaction is closed\");\n    }\n  }\n\n  private invalidReadAfterWrite(id: string): ChromaValueError {\n    return new ChromaValueError(\n      `cannot transactionally read id \"${id}\" after buffering a write for it`,\n    );\n  }\n}\n","sourceCodeStart":1711,"sourceCodeEnd":1747,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/chromadb/src/collection.ts#L1711-L1747","documentation":"Error \"transactional delete for id \"${id}\" requires a prior read proving the id is present\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at clients/new-js/packages/chromadb/src/collection.ts:1729 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":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}