Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
Loading