Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(sandbox): treat 404 as transient during server readiness polling (#1250)

ddupontfe2657a78c0c
diff --git a/libs/python/cua-sandbox/cua_sandbox/transport/cloud.py b/libs/python/cua-sandbox/cua_sandbox/transport/cloud.py
index 591e1c1705..8ad8419bf6 100644
--- a/libs/python/cua-sandbox/cua_sandbox/transport/cloud.py
+++ b/libs/python/cua-sandbox/cua_sandbox/transport/cloud.py
@@ -326,8 +326,8 @@ class CloudTransport(Transport):
await self._inner.get_screen_size()
return # Server is ready
except httpx.HTTPStatusError as e:
- if e.response.status_code < 500:
- raise # 4xx errors are not transient — fail fast
+ if e.response.status_code < 500 and e.response.status_code != 404:
+ raise # 4xx errors (except 404) are not transient — fail fast
last_err = e
logger.debug("[cloud] _wait_for_server_ready: elapsed=%.0fs err=%r", elapsed, e)
await asyncio.sleep(_POLL_INTERVAL)