Skip to content

fix(volcengine): rethrow errors in catch blocks instead of silently returning them - #231

Open
Ricardo-M-L wants to merge 1 commit into
agent-infra:mainfrom
Ricardo-M-L:fix/volcengine-swallow-errors
Open

fix(volcengine): rethrow errors in catch blocks instead of silently returning them#231
Ricardo-M-L wants to merge 1 commit into
agent-infra:mainfrom
Ricardo-M-L:fix/volcengine-swallow-errors

Conversation

@Ricardo-M-L

Copy link
Copy Markdown
Contributor

This PR addresses: fix(volcengine): rethrow errors in catch blocks instead of silently returning them

…eturning them

All five VolcengineProvider methods (createSandbox, deleteSandbox,
getSandbox, setSandboxTimeout, listSandboxes) caught errors and then
did `return error`, treating the caught Error as a success value. The
caller's `await provider.createSandbox(...)` would resolve with an
Error instance instead of rejecting, which means try/catch at the call
site never triggers and consumers can't distinguish success from
failure without explicit `instanceof Error` checks on every response.

Changed all catch blocks to `throw error` so promise rejections
propagate naturally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Ricardo-M-L Ricardo-M-L changed the title fix: fix(volcengine): rethrow errors in catch blocks instead of silently returning them fix(volcengine): rethrow errors in catch blocks instead of silently returning them Aug 17, 2026
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