Skip to content

Commit e9a3f34

Browse files
committed
sandbox id max length 63
1 parent 8ee76e4 commit e9a3f34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/code-interpreter/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function callCloudflareAPI(
4343

4444
async function executePythonCode(env: Env, code: string): Promise<string> {
4545
const sandboxId = env.Sandbox.idFromName('default');
46-
const sandbox = getSandbox(env.Sandbox, sandboxId.toString());
46+
const sandbox = getSandbox(env.Sandbox, sandboxId.toString().slice(0, 63));
4747
const pythonCtx = await sandbox.createCodeContext({ language: 'python' });
4848
const result = await sandbox.runCode(code, {
4949
context: pythonCtx

0 commit comments

Comments
 (0)