You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ENH]: Make error messages in attach_function clearer (#5973)
## Description of changes
_Summarize the changes made by this PR._
- Improvements & Bug fixes
- Errors fixed:
- Param validation
- Output collection already exists error looks nicer now
- Function already exists error looks cleaner
- Invalid function to be attached error added
- Collection already has an attached function
- New functionality
- ...
## Test plan
_How are these changes tested?_
- [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust
## Migration plan
_Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?_
## Observability plan
_What is the plan to instrument and monitor this change?_
## Documentation Changes
_Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the_ [_docs section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
// which returns "record_counter" for FunctionRecordCounter - different from requestedOperatorName
505
+
// Validation returns (false, nil) early, so DatabaseDb.GetDatabases is NOT called
529
506
530
507
_=txFunc(txCtx)
531
-
}).Return(status.Errorf(codes.AlreadyExists, "different function is attached with this name: existing=%s, requested=%s", existingOperatorName, requestedOperatorName)).Once()
508
+
}).Return(status.Errorf(codes.AlreadyExists, "collection already has an attached function: name=%s, function=%s, output_collection=%s", attachedFunctionName, existingOperatorName, outputCollectionName)).Once()
0 commit comments