fix: include gRPC status code in batch delete error messages (Fixes #1030)#2083
Open
rtmalikian wants to merge 1 commit into
Open
fix: include gRPC status code in batch delete error messages (Fixes #1030)#2083rtmalikian wants to merge 1 commit into
rtmalikian wants to merge 1 commit into
Conversation
weaviate#1030) Previously, batch delete failures produced unhelpful error messages like 'Query call with protocol GRPC delete failed with message unavailable.' without indicating the gRPC status code. Now the error includes the status code name (e.g., [UNAVAILABLE], [DEADLINE_EXCEEDED]) to help users diagnose whether the failure is due to server overload, timeout, or other gRPC-level issues. Affects both sync (ConnectionSync.grpc_batch_delete) and async (ConnectionAsync.grpc_batch_delete) code paths. Signed-off-by: rtmalikian <rtmalikian@gmail.com>
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 |
|
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. |
Contributor
Author
|
I agree to the Weaviate Contributor License Agreement. Thank you! |
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.
Fixes #1030
Problem
When
delete_many()fails due to server timeout, overload, or network issues, the error message is unhelpful:Users cannot distinguish between
UNAVAILABLE(server overload/network),DEADLINE_EXCEEDED(timeout), or other gRPC status codes from this message alone.Solution
Include the gRPC status code name in the
WeaviateDeleteManyErrormessage for both sync and async code paths:This makes it immediately clear whether the failure is due to server availability, a timeout, or another gRPC-level issue — helping users decide whether to retry, reduce batch size, or investigate infrastructure.
Changes
weaviate/connect/v4.pyline 1055 (sync):str(error.details())→f"[{error.code().name}] {error.details()}"weaviate/connect/v4.pyline 1235 (async):str(e)→f"[{e.code().name}] {e.details()}"Verification
ast.parse()syntax check passesWeaviateQueryErroralready include context)Before/After
message unavailable.[UNAVAILABLE] unavailablemessage Deadline Exceeded[DEADLINE_EXCEEDED] Deadline ExceededInsufficientPermissionsError(unchanged)InsufficientPermissionsError(unchanged)Changelog
Files Changed
weaviate/connect/v4.py— Added[{code}.name]prefix toWeaviateDeleteManyErrormessagesAbout the Author: Raphael Malikian — Clinical AI Solutions Architect. I specialise in building and fixing AI/ML systems for healthcare, including vector databases, RAG pipelines, and clinical NLP. If you need help with your project or think I can add value to your organisation, feel free to reach out — I'd love to connect.
📧 rtmalikian@gmail.com
🔗 GitHub: https://github.com/rtmalikian
🔗 LinkedIn: http://www.linkedin.com/in/raphael-t-malikian-mbbs-bsc-hons-71075436a
Disclosure: This code was developed with assistance from DeepSeek V4 Pro (DeepSeek) via Hermes Agent (Nous Research). All changes were reviewed, tested against the actual codebase, and verified for correctness.