Skip to content

Commit b068b42

Browse files
authored
Merge pull request #2083 from rtmalikian/fix/issue-1030-batch-delete-error-msg
fix: include gRPC status code in batch delete error messages (Fixes #1030)
2 parents 9818255 + 0d0c02f commit b068b42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

weaviate/connect/v4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ def grpc_batch_delete(
10521052
error = cast(Call, e)
10531053
if error.code() == StatusCode.PERMISSION_DENIED:
10541054
raise InsufficientPermissionsError(error)
1055-
raise WeaviateDeleteManyError(str(error.details()))
1055+
raise WeaviateDeleteManyError(f"[{error.code().name}] {error.details()}")
10561056

10571057
def grpc_tenants_get(
10581058
self, request: tenants_pb2.TenantsGetRequest
@@ -1232,7 +1232,7 @@ async def grpc_batch_delete(
12321232
except AioRpcError as e:
12331233
if e.code().name == PERMISSION_DENIED:
12341234
raise InsufficientPermissionsError(e)
1235-
raise WeaviateDeleteManyError(str(e))
1235+
raise WeaviateDeleteManyError(f"[{e.code().name}] {e.details()}")
12361236

12371237
async def grpc_batch_stream(
12381238
self,

0 commit comments

Comments
 (0)