Skip to content

Commit

Permalink
add grpc error tips
Browse files Browse the repository at this point in the history
Signed-off-by: wzh <[email protected]>
  • Loading branch information
zhihuiwan committed Jun 2, 2020
1 parent a79e6eb commit 8ae709b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fate_flow/utils/api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ def remote_api(job_id, method, endpoint, src_party_id, dest_party_id, src_role,
json_body = json.loads(_return.body.value)
return json_body
except Exception as e:
raise Exception('rpc request error: {}'.format(e))
tips = ''
if 'Error received from peer' in str(e):
tips = 'Please check if the fate flow server of the other party is started. '
if 'failed to connect to all addresses' in str(e):
tips = 'Please check whether the rollsite service(port: 9370) is started. '
raise Exception('{}rpc request error: {}'.format(tips,e))


def local_api(method, endpoint, json_body):
Expand Down

0 comments on commit 8ae709b

Please sign in to comment.