Skip to content

fix: include gRPC status code in batch delete error messages (Fixes #1030)#2083

Open
rtmalikian wants to merge 1 commit into
weaviate:mainfrom
rtmalikian:fix/issue-1030-batch-delete-error-msg
Open

fix: include gRPC status code in batch delete error messages (Fixes #1030)#2083
rtmalikian wants to merge 1 commit into
weaviate:mainfrom
rtmalikian:fix/issue-1030-batch-delete-error-msg

Conversation

@rtmalikian

Copy link
Copy Markdown
Contributor

Fixes #1030

Problem

When delete_many() fails due to server timeout, overload, or network issues, the error message is unhelpful:

Query call with protocol GRPC delete failed with message unavailable.

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 WeaviateDeleteManyError message for both sync and async code paths:

Query call with protocol GRPC delete failed with message [UNAVAILABLE] unavailable.

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.py line 1055 (sync): str(error.details())f"[{error.code().name}] {error.details()}"
  • weaviate/connect/v4.py line 1235 (async): str(e)f"[{e.code().name}] {e.details()}"

Verification

  • Python ast.parse() syntax check passes
  • Follows existing codebase pattern (other error handlers like WeaviateQueryError already include context)
  • Both sync and async code paths updated consistently

Before/After

Scenario Before After
Server unavailable message unavailable. [UNAVAILABLE] unavailable
Request timeout message Deadline Exceeded [DEADLINE_EXCEEDED] Deadline Exceeded
Permission denied InsufficientPermissionsError (unchanged) InsufficientPermissionsError (unchanged)

Changelog

Date Change Author
2026-06-28 Include gRPC status code in batch delete error messages rtmalikian

Files Changed

  • weaviate/connect/v4.py — Added [{code}.name] prefix to WeaviateDeleteManyError messages

About 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.

 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>

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

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.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@rtmalikian

Copy link
Copy Markdown
Contributor Author

I agree to the Weaviate Contributor License Agreement. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batch delete (delete_many) fails with unclear error on timeout.

2 participants