Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Error classes raised by the porter-sandbox Python Sandbox SDK
SandboxError
from porter_sandbox import ( AuthenticationError, NotFoundError, RateLimitError, SandboxError, ServerError, )
AuthenticationError
NotFoundError
RateLimitError
ServerError
message
str
status_code
int | None
body
object | None
from porter_sandbox import Porter, SandboxError with Porter() as porter: sandbox = porter.sandboxes.create(image="python:3.12-slim") try: result = sandbox.exec(["python", "-c", "raise SystemExit(2)"]) if result.exit_code != 0: print(result.stderr) except SandboxError as exc: print(f"Sandbox API error: {exc.message}") finally: sandbox.terminate()