chroma-core/chroma · error · ChromaValueError

conditional transaction is closed

Error message

conditional transaction is closed

What it means

Error "conditional transaction is closed" thrown in chroma-core/chroma.

Source

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

      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`,
    );
  }
}

/**
 * Arguments for creating a CollectionHandle instance.
 */
export interface CollectionHandleArgs {
  /** ChromaDB client instance */
  chromaClient: ChromaClient;
  /** HTTP API client */
  apiClient: ReturnType<typeof createClient>;

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:1737 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/43fbb1889518473c. Report an issue: GitHub.