fix: correct aggregation error message case and aget_routes signature#667
Merged
jamescalam merged 1 commit intoJul 15, 2026
Merged
Conversation
- routers/base.py: error message told users to pass 'SUM', 'MEAN', 'MAX' but the validation checks against lowercase 'sum', 'mean', 'max'. Anyone following the error message would trigger the same error again. Fix: align error message to lowercase. Applied to both call sites (lines 424, 1533). Also remove unreachable dead code after raise NotImplementedError in _refresh_routes. - index/local.py: aget_routes was declared as a sync def despite the 'a' async prefix convention used throughout the codebase. The error message also said "Sync remove is not implemented" -- wrong method name and type. Fix: make it async def and correct the error message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jamescalam
approved these changes
Jul 15, 2026
Member
|
great catch, merging now thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1. Aggregation error message uses wrong case (
routers/base.py)The validation checks against lowercase values but the error message told users to use uppercase:
Following the error message causes the same error to trigger again. Fixed by aligning the message to lowercase. Applied to both occurrences (lines 424 and 1533 before this change).
2.
aget_routesinLocalIndexdeclared as sync (index/local.py)aget_routesfollows thea-prefix async convention used throughout the codebase (e.g.aadd,adelete,asearch) but was declared as a syncdef. The error message also said "Sync remove is not implemented" — wrong method name and wrong type.Fixed:
async def aget_routeswith correct error message.3. Dead code after
raise NotImplementedErrorin_refresh_routes13 lines of unreachable code (incomplete draft implementation) were left after the
raise NotImplementedError. Removed.