chroma-core/chroma · error · ChromaValueError

transactional delete for id "${id}" requires a prior read pr

Error message

transactional delete for id "${id}" requires a prior read proving the id is present

What it means

Error "transactional delete for id "${id}" requires a prior read proving the id is present" thrown in chroma-core/chroma.

Source

Thrown at clients/new-js/packages/chromadb/src/collection.ts:1729

    }
  }

  private validateWritePrecondition(
    operation: ConditionalTransactionOperationPayload["operation"],
    id: string,
  ): void {
    if (operation === "add" && !this.knownAbsent.has(id)) {
      throw new ChromaValueError(
        `transactional add for id "${id}" requires a prior read proving the id is absent`,
      );
    }
    if (operation === "update" && !this.knownPresent.has(id)) {
      throw new ChromaValueError(
        `transactional update for id "${id}" requires a prior read proving the id is present`,
      );
    }
    if (operation === "delete" && !this.knownPresent.has(id)) {
      throw new ChromaValueError(
        `transactional delete for id "${id}" requires a prior read proving the id is present`,
      );
    }
  }

  private ensureOpen(): void {
    if (this.closed) {
      throw new ChromaValueError("conditional transaction is closed");
    }
  }

  private invalidReadAfterWrite(id: string): ChromaValueError {
    return new ChromaValueError(
      `cannot transactionally read id "${id}" after buffering a write for it`,
    );
  }
}

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:1729 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/a9f0879a23810eb2. Report an issue: GitHub.