Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt

Use this file to discover all available pages before exploring further.

All cwsandbox exceptions inherit from CWSandboxError.

Hierarchy

CWSandboxError
    +-- CWSandboxAuthenticationError
    +-- SandboxError
        +-- SandboxNotRunningError
        +-- SandboxTimeoutError
        +-- SandboxTerminatedError
        +-- SandboxFailedError
        +-- SandboxNotFoundError
        +-- SandboxExecutionError
        +-- SandboxFileError
    +-- DiscoveryError
        +-- RunnerNotFoundError
        +-- ProfileNotFoundError
    +-- FunctionError
        +-- AsyncFunctionError
        +-- FunctionSerializationError

Reference

CWSandboxError

Source: src/cwsandbox/exceptions.py:15 Base exception for all CWSandbox operations.

CWSandboxAuthenticationError

Source: src/cwsandbox/exceptions.py:19 Raised when authentication fails.

SandboxError

Source: src/cwsandbox/exceptions.py:23 Base exception for sandbox operations.

SandboxNotRunningError

Source: src/cwsandbox/exceptions.py:27 Raised when an operation requires a running sandbox.

SandboxTimeoutError

Source: src/cwsandbox/exceptions.py:31 Raised when a sandbox operation times out.

SandboxTerminatedError

Source: src/cwsandbox/exceptions.py:35 Raised when a sandbox was terminated externally.

SandboxFailedError

Source: src/cwsandbox/exceptions.py:39 Raised when a sandbox fails to start or encounters a fatal error.

SandboxNotFoundError

Source: src/cwsandbox/exceptions.py:43 Raised when a sandbox is not found (e.g., already deleted). Attributes
  • sandbox_id (str | None): The ID of the sandbox that was not found, or None.

SandboxExecutionError

Source: src/cwsandbox/exceptions.py:55 Raised when command execution fails inside a sandbox. Attributes
  • exec_result (ProcessResult | None): The ProcessResult from the failed execution, or None.
  • exception_type (str | None): Python exception class name from sandbox stderr, or None.
  • exception_message (str | None): Exception message from sandbox stderr, or None.

SandboxFileError

Source: src/cwsandbox/exceptions.py:78 Raised when a file operation fails in the sandbox. Attributes
  • filepath (str | None): The path of the file that caused the error, or None.

DiscoveryError

Source: src/cwsandbox/exceptions.py:93 Base exception for discovery operations (runners, profiles).

RunnerNotFoundError

Source: src/cwsandbox/exceptions.py:102 Raised when a runner ID is not found. Attributes
  • runner_id (str): The ID of the runner that was not found.

ProfileNotFoundError

Source: src/cwsandbox/exceptions.py:114 Raised when a profile is not found. Attributes
  • profile_name (str): The name of the profile that was not found.
  • runner_id (str | None): The runner ID if specified in the request, or None.

FunctionError

Source: src/cwsandbox/exceptions.py:128 Base exception for function execution operations.

AsyncFunctionError

Source: src/cwsandbox/exceptions.py:132 Raised when an async function is passed to @session.function().

FunctionSerializationError

Source: src/cwsandbox/exceptions.py:140 Raised when arguments, referenced globals, or closures cannot be serialized.
Last modified on May 1, 2026