Skip to content

Sdk improvements#50

Merged
bchatelard merged 6 commits into
mainfrom
sdk-improvements
Jun 30, 2026
Merged

Sdk improvements#50
bchatelard merged 6 commits into
mainfrom
sdk-improvements

Conversation

@bchatelard

Copy link
Copy Markdown
Member
  • SandboxServiceError — New typed exception for HTTP 5xx errors from the sandbox executor, with status_code attribute. Raised from executor_client.py instead of leaking raw httpx.HTTPStatusError.
  • SandboxTimeoutError — httpx.TimeoutException (including ReadTimeout) is now converted to SandboxTimeoutError in both buffered and streaming requests.
  • exec.py simplified — Removed the broad except Exception blocks that were silently wrapping errors into CommandResult. Errors now propagate as typed exceptions instead of masquerading as failed commands.
  • filesystem.py cleanup — Fixed isinstance() anti-pattern in exception handling; SandboxServiceError and SandboxFilesystemError are now caught with proper except clauses.
  • executor_client.py streaming fix — Fixed ResponseNotRead crash when accessing response.text on streaming responses (need response.read() / await response.aread() first).
  • close() / del fix — Used getattr(self, "_closed", True) to prevent AttributeError when init fails partway through (sync + async clients).

@bchatelard bchatelard merged commit 79ec4ea into main Jun 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant