Skip to content

Commit

Permalink
Fix inaccurate internal error code (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 authored Sep 8, 2021
1 parent dc8f214 commit b152c3e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions coordinator/gscoordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,20 @@ def RunStep(self, request, context):
run_dag_on, dag_def = next_dag
try:
if run_dag_on == GSEngine.analytical_engine:
error_code = error_codes_pb2.ANALYTICAL_ENGINE_INTERNAL_ERROR
self.run_on_analytical_engine(
request.session_id, dag_def, op_results
)
elif run_dag_on == GSEngine.interactive_engine:
error_code = error_codes_pb2.INTERACTIVE_ENGINE_INTERNAL_ERROR
self.run_on_interactive_engine(
request.session_id, dag_def, op_results
)
elif run_dag_on == GSEngine.learning_engine:
error_code = error_codes_pb2.LEARNING_ENGINE_INTERNAL_ERROR
self.run_on_learning_engine(request.session_id, dag_def, op_results)
elif run_dag_on == GSEngine.coordinator:
error_code = error_codes_pb2.COORDINATOR_INTERNAL_ERROR
self.run_on_coordinator(request.session_id, dag_def, op_results)
except grpc.RpcError as exc:
# Not raised by graphscope, maybe socket closed, etc
Expand All @@ -520,8 +524,8 @@ def RunStep(self, request, context):
return message_pb2.RunStepResponse()
except Exception as exc:
return self._make_response(
error_codes_pb2.ANALYTICAL_ENGINE_INTERNAL_ERROR,
"Error occurred during preprocessing: " + traceback.format_exc(),
error_code,
f"Error occurred during preprocessing, The traceback is: {traceback.format_exc()}",
pickle.dumps(exc),
)
return message_pb2.RunStepResponse(results=op_results)
Expand Down

0 comments on commit b152c3e

Please sign in to comment.