e2b blueprint: exec throws on non-zero exit instead of returning exitCode
Author: hellovietducCreated Oct 1, 2026Updated Oct 1, 2026
Describe the Bug
in sandbox/e2b@1, exec calls commands.run(), which throws CommandExitError on any non-zero exit ([email protected]). so exec rejects instead of returning exitCode, and the error doesn't include the command or stderr.
the blueprint's comment saying commands.run() returns { stdout, stderr, exitCode } directly is wrong for non-zero exits too.
Expected Behavior
non-zero exits resolve with { stdout, stderr, exitCode }. something like:
.catch((error) => {
if (error instanceof CommandExitError) return error;
throw error;
});Steps to Reproduce
flue add sandbox e2bawait sandbox.exec('exit 3')- rejects with
CommandExitError: exit status 3
Source: withastro/flue