This commit is contained in:
Typer_Body
2026-06-02 02:29:35 +08:00
parent 543fbd8ca0
commit 192b69b0fb
7 changed files with 33 additions and 14 deletions

View File

@@ -109,8 +109,15 @@ class WorkflowWebSocketChatRouterGroup(group.RouterGroup):
)
try:
await quart.websocket.send(json.dumps({'type': 'error', 'message': str(e)}))
except:
pass
except Exception as send_error:
logger.debug(
'Failed to send error message to workflow websocket client',
exc_info=True,
extra={
'workflow_uuid': workflow_uuid,
'send_error': str(send_error),
},
)
@self.route('/messages/<session_type>', methods=['GET'])
async def get_messages(workflow_uuid: str, session_type: str) -> str:

View File

@@ -340,7 +340,11 @@ class WorkflowService:
if bot:
bot_name = bot.get('name', 'WebChat')
except Exception:
pass
logger.warning(
"Failed to fetch bot info for bot_id=%s; using default bot name.",
bot_id,
exc_info=True,
)
# Create execution context
context = ExecutionContext(