Skip to content

Commit

Permalink
fix: add more logging in grpc dry run (#5036)
Browse files Browse the repository at this point in the history
  • Loading branch information
zac-li committed Jul 28, 2022
1 parent 5116b92 commit fb88015
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions jina/clients/base/grpc.py
Expand Up @@ -46,6 +46,10 @@ async def _dry_run(self, **kwargs) -> bool:
)
if response.code == jina_pb2.StatusProto.SUCCESS:
return True
else:
self.logger.error(
f'Returned code is not expected! Exception: {response.exception}'
)
except Exception as e:
self.logger.error(f'Error while getting response from grpc server {e!r}')

Expand Down
2 changes: 1 addition & 1 deletion jina/clients/base/http.py
Expand Up @@ -65,7 +65,7 @@ async def _dry_run(self, **kwargs) -> bool:
if r_str['code'] == jina_pb2.StatusProto.SUCCESS:
return True
else:
self.logger.debug(
self.logger.error(
f'Returned code is not expected! Description: {r_str["description"]}'
)
except Exception as e:
Expand Down

0 comments on commit fb88015

Please sign in to comment.