diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index d003cc68f..a138d0f29 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -730,7 +730,7 @@ def _execute_search( return SearchFuture(future, func) response = self._stub.Search(request, timeout=timeout) - if response.status.code == 0 and response.status.error_code == 0: + if response.status.code != 0 or response.status.error_code != 0: raise MilvusException(response.status.code, response.status.reason) round_decimal = kwargs.get("round_decimal", -1)