Skip to content

[BUG](api): confusing 'Limit limit' wording in validation error messages in operator.py #7296

Description

@rtmalikian

Problem

The Limit.from_dict() validator in chromadb/execution/expression/operator.py (lines 581, 584) produces confusing error messages that stutter:

f"Limit limit must be an integer, got {type(limit).__name__}"
f"Limit limit must be positive, got {limit}"

The "Limit limit" reads as a repeated word, making the error message confusing to users. The pattern "Limit offset" (line 571) is clear because "Limit" is the expression type and "offset" is the field name. But "Limit limit" stutters because the same word appears twice.

Expected Behavior

Error messages should be clear and unambiguous:

"limit must be a positive integer, got ..."
"limit must be positive, got ..."

Affected Files

  • chromadb/execution/expression/operator.py lines 581, 584

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions