Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
James Hush
2026-02-03 16:42:13 +08:00
committed by GitHub
parent b427d534ae
commit 90bead06ab
2 changed files with 2 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ async def parse_telephony_websocket(websocket: WebSocket):
except json.JSONDecodeError:
first_message = {}
except StopAsyncIteration:
logger.error("WebSocket closed without sending any messages")
raise ValueError("WebSocket closed before receiving telephony handshake messages")
# Second message

View File

@@ -6,7 +6,7 @@
import json
import unittest
from unittest.mock import AsyncMock, MagicMock
from unittest.mock import MagicMock
from pipecat.runner.utils import parse_telephony_websocket