Repository navigation
feat(sdk): add SandboxNotRunningError and SandboxUnreachableError for a sandbox whose envd cannot be reached; health-probe connect failures #1949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,717
−243
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
dd9d4eb
feat(sdk): add SandboxUnreachableError for an unreachable sandbox
devin-ai-integration[bot] 23130a0
revert proxy 502 'port is not open' mapping; keep sandbox-timeout Tim…
devin-ai-integration[bot] 9dcc6f8
fix(js-sdk): map Unavailable on command/watch start through the rpc e…
devin-ai-integration[bot] f30aebd
fix(js-sdk): treat browsers' opaque network TypeErrors as transport f…
devin-ai-integration[bot] bac187c
feat(sdk): SandboxUnreachableError extends TimeoutError; raise it for…
devin-ai-integration[bot] d9612f9
feat(sdk): raise SandboxNotFoundError/SandboxNotFoundException for a …
devin-ai-integration[bot] db210d2
feat(sdk): probe sandbox health on an Unavailable with an unknown mes…
devin-ai-integration[bot] 5080b27
feat(sdk): raise SandboxUnreachableError for every 502/Unavailable fr…
devin-ai-integration[bot] ca30ac8
fix(js-sdk): let Connect-encoded 502 errors through rejectProxyUnavai…
devin-ai-integration[bot] 25d3dc5
fix(js-sdk): only forward 502 bodies whose string code is a Connect c…
devin-ai-integration[bot] 4bd05ee
fix(sdk): scope the start error map to watchDir; filesystem RPCs keep…
devin-ai-integration[bot] 8a0c90b
feat(sdk): add SandboxNotRunningError/Exception for a proxy or probe …
devin-ai-integration[bot] 19c97cc
fix(sdk): keep SandboxNotFoundError on JS command/PTY/watch start, pr…
devin-ai-integration[bot] 5a6f97a
feat(js-sdk)!: command/PTY/watch start on a gone sandbox throws Sandb…
devin-ai-integration[bot] e730668
chore: bump the sandbox unreachable changeset to minor
devin-ai-integration[bot] 9b42f78
docs: shorten the sandbox unreachable changeset
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| '@e2b/python-sdk': minor | ||
| 'e2b': minor | ||
| --- | ||
|
|
||
| Add `SandboxNotRunningError` / `SandboxNotRunningException` and `SandboxUnreachableError` / `SandboxUnreachableException` for envd requests that fail because the sandbox cannot be reached. Both extend `TimeoutError` / `TimeoutException`, which these cases raised before, so existing `instanceof TimeoutError` / `except TimeoutException` handling keeps working. | ||
|
|
||
| - `SandboxNotRunning*` — the proxy answered `502 "The sandbox was not found"` (killed, paused or timed out), either directly or from the health probe the SDK runs after a dropped connection or an unexplained `Unavailable` (e.g. the sandbox was killed mid-command). Retrying will not help. | ||
| - `SandboxUnreachable*` — the sandbox is not confirmed stopped but cannot be reached: `502 "port is not open"`, other `502`s, or a connection failure whose health probe got no answer. The original error is the `cause` / `__cause__`. | ||
| - A connection failure whose health probe finds the sandbox running still raises the original transport error. The probe itself runs without connection retries. | ||
|
|
||
| **Breaking (JS):** `commands.run` / `connect`, `pty.create` / `connect` and `files.watchDir` on a gone sandbox now throw `SandboxNotRunningError` instead of `SandboxNotFoundError`, like every other call. `SandboxNotFoundError` is only raised by the control plane API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.