Skip to content

Commit 68ae32c

Browse files
authored
Merge pull request #609 from runloopai/alb/fix-await-running
Fix await_running API error type
2 parents 56e89a6 + b0aa11d commit 68ae32c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
SyncDiskSnapshotsCursorIDPage,
8989
AsyncDiskSnapshotsCursorIDPage,
9090
)
91-
from ..._exceptions import RunloopError
91+
from ..._exceptions import RunloopError, APIStatusError
9292
from ...lib.polling import PollingConfig, poll_until
9393
from ..._base_client import AsyncPaginator, make_request_options
9494
from .disk_snapshots import (
@@ -400,7 +400,7 @@ def wait_for_devbox_status() -> DevboxView:
400400

401401
def handle_timeout_error(error: Exception) -> DevboxView:
402402
# Handle 408 timeout errors by returning current devbox state to continue polling
403-
if isinstance(error, httpx.HTTPStatusError) and error.response.status_code == 408:
403+
if isinstance(error, APIStatusError) and error.response.status_code == 408:
404404
# Return a placeholder result to continue polling
405405
return DevboxView(
406406
id=id,
@@ -1710,7 +1710,7 @@ async def wait_for_devbox_status() -> DevboxView:
17101710
),
17111711
cast_to=DevboxView,
17121712
)
1713-
except httpx.HTTPStatusError as error:
1713+
except APIStatusError as error:
17141714
if error.response.status_code == 408:
17151715
# Handle 408 timeout errors by returning a placeholder result to continue polling
17161716
return DevboxView(

0 commit comments

Comments
 (0)