From 288cda1b5e37133156d8cef07d7e1c9b107b82a5 Mon Sep 17 00:00:00 2001 From: Albert Li Date: Tue, 8 Jul 2025 17:24:14 -0700 Subject: [PATCH 1/2] Fix await_running --- src/runloop_api_client/resources/devboxes/devboxes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 3ed478e1f..6c259bdc0 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -88,7 +88,7 @@ SyncDiskSnapshotsCursorIDPage, AsyncDiskSnapshotsCursorIDPage, ) -from ..._exceptions import RunloopError +from ..._exceptions import APIStatusError, RunloopError from ...lib.polling import PollingConfig, poll_until from ..._base_client import AsyncPaginator, make_request_options from .disk_snapshots import ( @@ -400,7 +400,7 @@ def wait_for_devbox_status() -> DevboxView: def handle_timeout_error(error: Exception) -> DevboxView: # Handle 408 timeout errors by returning current devbox state to continue polling - if isinstance(error, httpx.HTTPStatusError) and error.response.status_code == 408: + if isinstance(error, APIStatusError) and error.response.status_code == 408: # Return a placeholder result to continue polling return DevboxView( id=id, @@ -1710,7 +1710,7 @@ async def wait_for_devbox_status() -> DevboxView: ), cast_to=DevboxView, ) - except httpx.HTTPStatusError as error: + except APIStatusError as error: if error.response.status_code == 408: # Handle 408 timeout errors by returning a placeholder result to continue polling return DevboxView( From b0aa11dca4d873e195fa042541250835dbd47129 Mon Sep 17 00:00:00 2001 From: Albert Li Date: Tue, 8 Jul 2025 17:26:16 -0700 Subject: [PATCH 2/2] Fix lint --- src/runloop_api_client/resources/devboxes/devboxes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 6c259bdc0..94df39be2 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -88,7 +88,7 @@ SyncDiskSnapshotsCursorIDPage, AsyncDiskSnapshotsCursorIDPage, ) -from ..._exceptions import APIStatusError, RunloopError +from ..._exceptions import RunloopError, APIStatusError from ...lib.polling import PollingConfig, poll_until from ..._base_client import AsyncPaginator, make_request_options from .disk_snapshots import (