Conversation
|
There was a problem hiding this comment.
Bug: Sync API Method Fails to Handle Errors
The _cls_get_info method in the sync API client is missing error handling for API Error responses, unlike its async counterpart. When the API returns an Error object, the sync method attempts to pass it directly to SandboxInfo._from_sandbox_detail, which expects a SandboxDetail object. This type mismatch will likely result in an AttributeError.
packages/python-sdk/e2b/sandbox_sync/sandbox_api.py#L95-L106
E2B/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
Lines 95 to 106 in 1b10c9d
Comment @cursor review or bugbot run to trigger another review on this PR
Description
We can simplify typing and return only SandboxInfo in SDKs as the types are very similar (there are some extra fields in detail, which we don't want to expose but we need them e.g. for connect)