Skip empty SSE data to avoid parsing errors (#1753)

Co-authored-by: ARJUN-TS1 <arjun.ts1@ibm.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
This commit is contained in:
Arjun TS 2025-12-09 20:44:23 +05:30 • committed by GitHub
commit 2bf9b10f63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,6 +105,9 @@ async def sse_client(
task_status.started(endpoint_url)
case "message":
# Skip empty data (keep-alive pings)
if not sse.data:
continue
try:
message = types.JSONRPCMessage.model_validate_json( # noqa: E501
sse.data