diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 3ed478e1f..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 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 ( @@ -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(