Skip to content

Commit

Permalink
fix: handling corner case for grpc error (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnishparmar authored Apr 11, 2023
1 parent e7b4c61 commit dd3ab05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/nmt/nmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def request(inputs,args):
result = {'msg': 'already exists error'}
elif e.code() == grpc.StatusCode.UNAVAILABLE:
result = {'msg': 'server unavailable check network'}
else:
result = {'msg': 'error code:{}'.format(e.code())}
print(f"{result['msg']} : {e.details()}")

args = parse_args()
Expand Down

0 comments on commit dd3ab05

Please sign in to comment.