Downgrade ConnectionClosedOK from ERROR to INFO level (#4541)

This commit is contained in:
pedrohsdb
2026-01-23 16:19:58 -08:00
committed by GitHub
parent 43d8020792
commit b44c0ac3df
2 changed files with 26 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ NOTE(jdo:streaming-local-dev)
import structlog
from fastapi import WebSocket
from websockets.exceptions import ConnectionClosedOK
from skyvern.config import settings
from skyvern.forge.sdk.routes.routers import base_router, legacy_base_router
@@ -92,7 +93,7 @@ async def stream(
organization_id = await auth(apikey=apikey, token=token, websocket=websocket)
if not organization_id:
LOG.warning("Authentication failed.", task_id=task_id, workflow_run_id=workflow_run_id)
LOG.info("Authentication failed.", task_id=task_id, workflow_run_id=workflow_run_id)
return
vnc_channel: VncChannel
@@ -166,6 +167,13 @@ async def stream(
organization_id=organization_id,
)
await collect(loops)
except ConnectionClosedOK:
LOG.info(
"VNC connection closed cleanly.",
task_id=task_id,
workflow_run_id=workflow_run_id,
organization_id=organization_id,
)
except Exception:
LOG.exception(
"An exception occurred in the vnc loop.",