> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK exceptions

See [Handle failures and unexpected state](https://docs.tokenfactory.nebius.com/sandboxes/sdk/python_sdk/troubleshooting.md) for recovery scenarios. Client API errors, transport
errors, `InterruptedError`, and validation errors can also propagate. A nonzero
process exit code is returned in `InstanceResult` by command execution.
`write_file()` raises `FileWriteError` if its write command does not confirm success.

## `exception FailedOperationError`

```python theme={null}
exception contree_sdk.exceptions.FailedOperationError(operation_uuid, error)
```

An operation reached a terminal non-SUCCESS status with no result at all.

A nonzero exit code is a normal InstanceResult, not an error - this is
only raised for an operation-level failure (e.g. the VM couldn’t start).

### Attributes

**args**

### Methods

#### `add_note()`

```python theme={null}
def add_note(note, /)
```

Add a note to the exception

#### `with_traceback()`

```python theme={null}
def with_traceback(tb, /)
```

Set self.**traceback** to tb and return self.

## `exception DockerBuildError`

```python theme={null}
exception contree_sdk.exceptions.DockerBuildError()
```

A Dockerfile build step failed (nonzero RUN exit code, unresolvable stage/image reference, etc.).

### Attributes

**args**

### Methods

#### `add_note()`

```python theme={null}
def add_note(note, /)
```

Add a note to the exception

#### `with_traceback()`

```python theme={null}
def with_traceback(tb, /)
```

Set self.**traceback** to tb and return self.

## `exception FileWriteError`

```python theme={null}
exception contree_sdk.exceptions.FileWriteError(path, message)
```

A file could not be written to the executor’s filesystem.

### Attributes

**args**

### Methods

#### `add_note()`

```python theme={null}
def add_note(note, /)
```

Add a note to the exception

#### `with_traceback()`

```python theme={null}
def with_traceback(tb, /)
```

Set self.**traceback** to tb and return self.
