chroma-core/chroma · error · Error
limit can only be specified when a where or whereDocument cl
Error message
limit can only be specified when a where or whereDocument clause is provided
What it means
Error "limit can only be specified when a where or whereDocument clause is provided" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/chromadb/src/collection.ts:862
ids,
embeddings,
};
}
private validateDelete(
ids?: string[],
where?: Where,
whereDocument?: WhereDocument,
limit?: number,
) {
if (ids) validateIDs(ids);
if (where) validateWhere(where);
if (whereDocument) validateWhereDocument(whereDocument);
if (limit !== undefined && (!Number.isInteger(limit) || limit < 0)) {
throw new Error("limit must be a non-negative integer");
}
if (limit !== undefined && !where && !whereDocument) {
throw new Error(
"limit can only be specified when a where or whereDocument clause is provided",
);
}
}
public async count(options?: { readLevel?: ReadLevel }): Promise<number> {
const { data } = await RecordService.collectionCount({
client: this.apiClient,
path: await this.path(),
query: options?.readLevel ? { read_level: options.readLevel } : undefined,
});
return data;
}
public async add({
ids,
embeddings,View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:862 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/7cd7d7dc45f323e7.
Report an issue: GitHub.