Skip to content

Commit

Permalink
fix: nicer error message for rpc errors (#5325)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackmin801 authored Oct 28, 2022
1 parent bce6ca8 commit 10e5cab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jina/clients/base/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import TYPE_CHECKING, Optional

import grpc
from grpc import RpcError

from jina.clients.base import BaseClient
from jina.clients.helper import callback_exec
Expand Down Expand Up @@ -51,6 +52,8 @@ async def _is_flow_ready(self, **kwargs) -> bool:
self.logger.error(
f'Returned code is not expected! Exception: {response.exception}'
)
except RpcError as e:
self.logger.error(f'RpcError: {e.details()}')
except Exception as e:
self.logger.error(f'Error while getting response from grpc server {e!r}')

Expand Down

0 comments on commit 10e5cab

Please sign in to comment.