diff --git a/apps/utils/exceptions.py b/apps/utils/exceptions.py index 88fdedcb..262d9787 100755 --- a/apps/utils/exceptions.py +++ b/apps/utils/exceptions.py @@ -46,4 +46,6 @@ def custom_exception_hander(exc, context): status = 400 return Response(data, status=status, headers=headers) args = (request_id, traceback.format_exc()) - myLogger.error(f"{args[0]}-{args[1]}") + err_detail = f"{args[0]}-{args[1]}" + myLogger.error(err_detail) + return Response(data={'err_code': 'server_error', 'err_detail': None, 'err_msg': '服务器错误'}, status=500) diff --git a/apps/wf/services.py b/apps/wf/services.py index d6d46738..ba19d221 100755 --- a/apps/wf/services.py +++ b/apps/wf/services.py @@ -413,4 +413,4 @@ class WfService(object): # 如果目标状态是脚本则异步执行 if state.participant_type == State.PARTICIPANT_TYPE_ROBOT: - run_task.delay(ticket_id=ticket.id, script_str=state.participant) + run_task.delay(ticket_id=ticket.id)