From 0d0c02f1d753c4d2ab5ce49a705cbac0e705d8a1 Mon Sep 17 00:00:00 2001 From: rtmalikian Date: Sat, 27 Jun 2026 18:19:00 -0700 Subject: [PATCH] fix: include gRPC status code in WeaviateDeleteManyError messages (Fixes #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 --- weaviate/connect/v4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weaviate/connect/v4.py b/weaviate/connect/v4.py index 56ece8ca2..b99c7df2c 100644 --- a/weaviate/connect/v4.py +++ b/weaviate/connect/v4.py @@ -1052,7 +1052,7 @@ def grpc_batch_delete( error = cast(Call, e) if error.code() == StatusCode.PERMISSION_DENIED: raise InsufficientPermissionsError(error) - raise WeaviateDeleteManyError(str(error.details())) + raise WeaviateDeleteManyError(f"[{error.code().name}] {error.details()}") def grpc_tenants_get( self, request: tenants_pb2.TenantsGetRequest @@ -1232,7 +1232,7 @@ async def grpc_batch_delete( except AioRpcError as e: if e.code().name == PERMISSION_DENIED: raise InsufficientPermissionsError(e) - raise WeaviateDeleteManyError(str(e)) + raise WeaviateDeleteManyError(f"[{e.code().name}] {e.details()}") async def grpc_batch_stream( self,