File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -357,6 +357,10 @@ export class SandboxApi {
357357 signal : config . getSignal ( opts ?. requestTimeoutMs ) ,
358358 } )
359359
360+ if ( res . error ?. code === 404 ) {
361+ throw new NotFoundError ( `Sandbox ${ sandboxId } not found` )
362+ }
363+
360364 const err = handleApiError ( res )
361365 if ( err ) {
362366 throw err
@@ -376,6 +380,10 @@ export class SandboxApi {
376380 signal : config . getSignal ( opts ?. requestTimeoutMs ) ,
377381 } )
378382
383+ if ( res . error ?. code === 404 ) {
384+ throw new NotFoundError ( `Sandbox ${ sandboxId } not found` )
385+ }
386+
379387 const err = handleApiError ( res )
380388 if ( err ) {
381389 throw err
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ async def _cls_get_info(
7676 client = api_client ,
7777 )
7878
79+ if res .status_code == 404 :
80+ raise NotFoundException (f"Sandbox { sandbox_id } not found" )
81+
7982 if res .status_code >= 300 :
8083 raise handle_api_exception (res )
8184
@@ -139,6 +142,9 @@ async def _cls_set_timeout(
139142 body = PostSandboxesSandboxIDTimeoutBody (timeout = timeout ),
140143 )
141144
145+ if res .status_code == 404 :
146+ raise NotFoundException (f"Paused sandbox { sandbox_id } not found" )
147+
142148 if res .status_code >= 300 :
143149 raise handle_api_exception (res )
144150
Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ def _cls_get_info(
7575 client = api_client ,
7676 )
7777
78+ if res .status_code == 404 :
79+ raise NotFoundException (f"Sandbox { sandbox_id } not found" )
80+
7881 if res .status_code >= 300 :
7982 raise handle_api_exception (res )
8083
@@ -138,6 +141,9 @@ def _cls_set_timeout(
138141 body = PostSandboxesSandboxIDTimeoutBody (timeout = timeout ),
139142 )
140143
144+ if res .status_code == 404 :
145+ raise NotFoundException (f"Sandbox { sandbox_id } not found" )
146+
141147 if res .status_code >= 300 :
142148 raise handle_api_exception (res )
143149
You can’t perform that action at this time.
0 commit comments