774056846 5 ヶ月 前
コミット
423a8aea22
2 ファイル変更6 行追加6 行削除
  1. 5 5
      src/core/callcenter/__init__.py
  2. 1 1
      src/core/callcenter/views.py

+ 5 - 5
src/core/callcenter/__init__.py

@@ -7,7 +7,7 @@ from flask import Flask, request, render_template_string
 from flask_sqlalchemy import SQLAlchemy
 from flask_cors import CORS
 from .constant import error_response
-# from .exception import BizException
+from .exception import BizException
 
 db = SQLAlchemy()
 
@@ -40,10 +40,10 @@ def create_app():
 app = create_app()
 
 
-# @app.errorhandler(BizException)
-# def handle_biz_exception(error):
-#     traceback.print_exc()
-#     return error_response(msg=str(error), http_code=200)
+@app.errorhandler(BizException)
+def handle_biz_exception(error):
+    traceback.print_exc()
+    return error_response(msg=str(error), http_code=200)
 
 # Generic error handler for uncaught exceptions
 @app.errorhandler(Exception)

+ 1 - 1
src/core/callcenter/views.py

@@ -15,7 +15,7 @@ from .call import CallService
 from .agent import AgentService, AgentOperService
 from .esl.client import InboundClient, OutboundClient
 
-# agent = BotAgent(_app.logger)
+# agent = BotAgent(app.logger)
 agent, _outbound_client = None, None
 inbound_client = InboundClient(agent, app.logger)
 # outbound_client = OutboundClient(agent, app.logger)