> ## 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.

# What do common sandbox SDK error messages mean?

The following table summarizes the most common exceptions that the SDK raises, along with their typical causes and recommended fixes.

| Error | Cause | Solution |
| - | - | - |
| `CWSandboxAuthenticationError` | Missing or invalid credentials | Check the credential for your selected [authentication method](https://docs.coreweave.com/support/sandboxes/articles/why-does-the-sandbox-sdk-raise-an-authentication-error) |
| `SandboxNotRunningError` | Operation on stopped sandbox | Check `sandbox.status` before operations |
| `SandboxTimeoutError` | Operation exceeded timeout | Increase `timeout_seconds` or optimize command |
| `SandboxTerminatedError` | This client called `stop()`, or a legacy backend reported `TERMINATED` | For an expected stop, use `wait_until_complete(raise_on_termination=False)`; see [termination handling](https://docs.coreweave.com/products/sandboxes/client/guides/sandbox-lifecycle.md#wait-for-a-terminal-state) |
| `SandboxFailedError` | Sandbox reached `FAILED`, including startup or runtime failure or maximum lifetime expiry | Check the error details, container image, resources, and `max_lifetime_seconds`. If your SDK exposes `status_reason`, check it on the sandbox or exception. It can be `None` when the backend reports no reason |
| `SandboxNotFoundError` | Sandbox deleted or never existed | Verify sandbox ID is correct |
| `SandboxExecutionError` | Command returned non-zero (with `check=True`) | Check `e.exec_result.stderr` for details |
| `SandboxFileError` | File operation failed | Check file path and permissions |
| `TypeError: Function arguments are not JSON-serializable` | A remote function argument isn't serializable to JavaScript Object Notation (JSON) | Before you call the remote function, convert the argument to JSON-compatible values. Pickle isn't supported for remote-function arguments or return values |
| `AsyncFunctionError` | Async function passed to `@session.function()` | Use sync functions only |

[Server Errors](https://docs.coreweave.com/support/sandboxes/tags/server-errors.md)
