Skip to content

Commit

Permalink
fix: handling corner case for grpc error
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnishparmar committed Apr 11, 2023
1 parent e7b4c61 commit 4cb856c
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': 'unkown error'}
print(f"{result['msg']} : {e.details()}")

args = parse_args()
Expand Down

0 comments on commit 4cb856c

Please sign in to comment.