You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge sandbox-killed check and request timeout formatting
Consolidate the two-line catch handler into a single
formatRequestError call that returns the error to throw, matching
the main SDK pattern (e2b-dev/E2B#1419).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
// If the state check itself fails we can't tell whether the sandbox
447
-
// was killed — assume it's running so the caller re-throws the
448
-
// original error instead of wrongly claiming the sandbox is gone.
442
+
// was killed — assume it's running so we re-throw the original error
443
+
// instead of wrongly claiming the sandbox is gone.
449
444
(awaitthis.isRunning().catch(()=>true))===false
450
445
){
451
-
thrownewTimeoutError(
446
+
returnnewTimeoutError(
452
447
'The sandbox was killed while the request was in progress. This can happen when the sandbox times out or is killed manually. '+
453
448
"You can modify the sandbox timeout by passing 'timeoutMs' when starting the sandbox or calling '.setTimeout' on the sandbox with the desired timeout."
0 commit comments