diff --git a/python/paddle_serving_client/pyclient.py b/python/paddle_serving_client/pyclient.py index 90682e2a43a86830fa78c56908dfe6e8b014717d..1eb3e562c1821d9db97d96670631c13f7caaff9c 100644 --- a/python/paddle_serving_client/pyclient.py +++ b/python/paddle_serving_client/pyclient.py @@ -50,8 +50,8 @@ class PyClient(object): req = self._pack_data_for_infer(feed) resp = self._stub.inference(req) if resp.ecode != 0: - raise Exception(resp.error_info) - fetch_map = {} + return {"ecode": resp.ecode, "error_info": resp.error_info} + fetch_map = {"ecode": resp.ecode} for idx, name in enumerate(resp.fetch_var_names): if name not in fetch: continue