Repository navigation
Add a distinct exception for generative query failures - #2210
Open
karthiksenv wants to merge 1 commit into
Open
karthiksenv wants to merge 1 commit into
karthiksenv wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
karthiksenv
marked this pull request as ready for review
October 17, 2026 22:20
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
Author
|
I agree to the Weaviate Contributor License Agreement. The Main CI workflow is awaiting maintainer approval. Could a maintainer approve the workflow and review this PR? The local Linux unit/mock suite passed with 646 tests passing and 1 skipped, and the before/after behavior was verified against Weaviate 1.39.7 for both sync and async clients. |
This branch has not been deployed
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.
Generative-query failures currently raise the same
WeaviateQueryErroras ordinary searches, so applications cannot select RAG-specific troubleshooting by exception type.Add
WeaviateGenerativeQueryErroras a subclass ofWeaviateQueryError. Sync and async gRPC searches select it when the request contains the generative field, including deadline expiry and exhausted retries. ExistingWeaviateQueryErrorhandlers still catch it;message/errorpreserve the original details and exception chaining preserves the cause. Ordinary search, permission, and validation errors retain their existing behavior.The exception identifies a failed generative request; it does not assume the provider caused the failure, since retrieval can also fail. The exception documentation includes a catch-order example and troubleshooting guidance.
Closes #818.
Validation:
671f0a5c, and the specialized error with this patch. No external model service or API key is required.PYTEST_XDIST_AUTO_NUM_WORKERS=2 python -m pytest test mock_tests -q --tb=short— 646 passed, 1 skipped (Python 3.12.13). The run used a native-filesystem archive of the exact PR commit.The development requirements pin Authlib 1.6.12 while package metadata requires >=1.7.1. The Windows regression environment used the CI-pinned dependencies; the full Linux suite and real-server comparison passed with dependencies satisfying package metadata. Two existing watchdog tests were unreliable on Windows; all three pass on Linux for both untouched upstream and the PR commit.
The upstream Main workflow currently reports
action_requiredfor this fork and needs maintainer approval to run. PR Security Lint passed.