argilla
argilla copied to clipboard
fix: add error code when searching for a record missing specific vector
Description
An error is raised from backend when trying to find similar records when the vector is not defined for the used record. The error is fine but an additional attribute is needed on the front to support mapping that specific error to a translated message to the user.
This PR adds a new custom error using message
and code
attributes to be rendered as a JSON response.
Closes #4655
Type of change
(Please delete options that are not relevant. Remember to title the PR according to the type of change)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactor (change restructuring the codebase without changing functionality)
- [ ] Improvement (change adding some improvement to an existing functionality)
- [ ] Documentation update
How Has This Been Tested
(Please describe the tests that you ran to verify your changes. And ideally, reference tests
)
- [ ] Modifying existents tests.
Checklist
- [ ] I added relevant documentation
- [ ] follows the style guidelines of this project
- [ ] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I filled out the contributor form (see text above)
- [ ] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)