51582e8315
The infra now validates sandbox ID format (^[a-z0-9]+$), allowing only lowercase alphanumeric characters. The test was using 'non-existing-sandbox' which fails format validation due to hyphens, returning a 400 error instead of reaching the expected 404 path. This updates the test to use 'nonexistingsandbox' — a valid format that doesn't exist, so it properly hits the 404 "not found" response and returns false as expected. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: test-only change that updates hardcoded IDs to match new validation rules, without modifying runtime logic. > > **Overview** > Updates JS and Python SDK `kill non-existing sandbox` tests to use a lowercase alphanumeric sandbox ID (`nonexistingsandbox`) instead of a hyphenated one, so the tests exercise the intended *not-found* path rather than failing format validation. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e43acb66ef4465ae60a368ac8c7377023b4a6da3. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Jakub Novak <jakub@e2b.dev>
What is E2B?
E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.
Run your first Sandbox
1. Install SDK
pip install e2b-code-interpreter
2. Get your E2B API key
E2B_API_KEY=e2b_***
3. Execute code with code interpreter inside Sandbox
from e2b_code_interpreter import Sandbox
with Sandbox.create() as sandbox:
sandbox.run_code("x = 1")
execution = sandbox.run_code("x+=1; x")
print(execution.text) # outputs 2
4. Check docs
Visit E2B documentation.
5. E2B cookbook
Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.
