---
sidebar:
  label: roboto.exceptions.domain
  order: 0
title: roboto.exceptions.domain
---
## Module Contents

### AUTHENTICATION_FAILURE_MESSAGE

```python
roboto.exceptions.domain.AUTHENTICATION_FAILURE_MESSAGE = 'Authentication to Roboto failed. This generally happens if the value in your...
```

`from roboto.exceptions.domain import AUTHENTICATION_FAILURE_MESSAGE`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L20-L24)

Message of the authentication failure the SDK raises when Roboto rejects the caller's token.

Carried by `RobotoAuthenticationFailureException`.

### ReadPlanExecutionErrorKind

```python
class roboto.exceptions.domain.ReadPlanExecutionErrorKind
```

`from roboto.exceptions import ReadPlanExecutionErrorKind`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L646-L694)

Bases: `roboto.compat.StrEnum`

Reason a read of a topic's data through its read plan cannot continue.

The `kind` of a `RobotoReadPlanExecutionException`.

**Attributes**

- **ReadPlanExecutionErrorKind.DATA_RANGE_NOT_IN_FILE** = `'data-range-not-in-file'`: A partition's `data_range` ends past its file's last stored row, so the file lacks rows the read needs.

- **ReadPlanExecutionErrorKind.ELEMENT_COUNT_MISMATCH** = `'element-count-mismatch'`: A named array holds a different number of elements than it has names.

- **ReadPlanExecutionErrorKind.FIELD_NOT_IN_FILE** = `'field-not-in-file'`: A file lacks a field the read takes from it: a field it supplies, or the partition's timestamp field.

- **ReadPlanExecutionErrorKind.FIELD_SPLIT_INSIDE_NON_STRUCT** = `'field-split-inside-non-struct'`: A partition's files split a field that one of them stores as other than a struct, such as a list or a map.

- **ReadPlanExecutionErrorKind.INCONSISTENT_SCAN_TASKS_ON_FILE** = `'inconsistent-scan-tasks-on-file'`: Scan tasks of one partition read one file but disagree on its format, transformations or topic name.

- **ReadPlanExecutionErrorKind.INVALID_TIMESTAMP** = `'invalid-timestamp'`: A stored timestamp has no signed 64-bit nanosecond value once shifted by its partition's `time_offset_ns`.

  It is NaN or infinite, a DECIMAL holding a fraction of a nanosecond, or out of range.

- **ReadPlanExecutionErrorKind.PARTITION_SCHEMA_MISMATCH** = `'partition-schema-mismatch'`: A later partition's files give the read a different schema than the first partition's.

- **ReadPlanExecutionErrorKind.PLAN_WITHOUT_SCHEMA** = `'plan-without-schema'`: The plan projects every field of its schema, has a partition with a scan task, and names no schema.

- **ReadPlanExecutionErrorKind.PROJECTED_FIELD_IN_NO_SCAN_TASK** = `'projected-field-in-no-scan-task'`: No scan task of a partition reads the whole schema or a subtree containing a projected field.

- **ReadPlanExecutionErrorKind.SCAN_TASK_ROW_MISMATCH** = `'scan-task-row-mismatch'`: The files of a partition hold different rows in the window.

- **ReadPlanExecutionErrorKind.UNSUPPORTED_FORMAT** = `'unsupported-format'`: A scan task stores its data in a format other than MCAP or Parquet, the formats the SDK decodes.

- **ReadPlanExecutionErrorKind.UNSUPPORTED_TIMESTAMP** = `'unsupported-timestamp'`: The partition's timestamp is in a form the SDK cannot read.

  The form is one of: a timestamp kind the SDK does not know; a schema field with no path; a unit other than s, ms, us or ns; a message log or publish time on a Parquet file; or a Parquet timestamp field that sits inside a list or map, holds a DATE or TIME, or is not a number.

### RobotoAuthenticationFailureException

```python
exception roboto.exceptions.domain.RobotoAuthenticationFailureException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions.domain import RobotoAuthenticationFailureException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L312-L317)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The caller's token is expired or malformed.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoAuthenticationFailureException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoConditionException

```python
exception roboto.exceptions.domain.RobotoConditionException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoConditionException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L421-L426)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

A condition the request depends on does not hold, such as the organization having an AI model it can use.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoConditionException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoConflictException

```python
exception roboto.exceptions.domain.RobotoConflictException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoConflictException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L429-L434)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request conflicts with an existing resource, such as by giving a name another resource already has.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoConflictException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoContextTooLongException

```python
exception roboto.exceptions.domain.RobotoContextTooLongException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    estimated_tokens: int = 0,
    max_tokens: int = 0,
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoContextTooLongException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L792-L816)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

A conversation with Roboto's AI is longer than the AI model can read at once.

The conversation's messages and tool results, together with the AI's instructions, exceed the model's context window. The exception does not carry the token count or the model's limit.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)
- **estimated_tokens** (`int`)
- **max_tokens** (`int`)

**Properties**

- **RobotoContextTooLongException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoDatasetNotFoundException

```python
exception roboto.exceptions.domain.RobotoDatasetNotFoundException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoDatasetNotFoundException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L328-L329)

Bases: [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException)

The dataset the request names does not exist, or the caller cannot see it.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

### RobotoDeprecatedException

```python
exception roboto.exceptions.domain.RobotoDeprecatedException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoDeprecatedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L389-L397)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request uses something Roboto has retired, such as a token in a format it no longer accepts.

Its message says what to use instead, such as a newer SDK or a new token.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoDeprecatedException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoDeviceNotFoundException

```python
exception roboto.exceptions.domain.RobotoDeviceNotFoundException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoDeviceNotFoundException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L332-L333)

Bases: [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException)

The device the request names does not exist, or the caller cannot see it.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

### RobotoDomainException

```python
exception roboto.exceptions.domain.RobotoDomainException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoDomainException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L31-L240)

Bases: `Exception`

Base class of the exceptions the SDK raises when Roboto refuses a request or fails to complete it.

Roboto reports an error as an envelope, `{"error": {"error_code": ..., "message": ...}}`, whose `error_code` is the name of a subclass, and the SDK raises that subclass. Some subclasses carry more fields in the envelope, such as the limit in `RobotoLimitExceededException`. The SDK also raises some subclasses itself, for input it rejects before sending a request.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoDomainException.error_code** (`str`): Code that identifies the error in its envelope: the name of this class.
- **RobotoDomainException.headers** (`dict[str, str]`): HTTP headers of the response that reported the error, or an empty dictionary when no response did.
- **RobotoDomainException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.
- **RobotoDomainException.message** (`str`): Human-readable description of the error.
- **RobotoDomainException.stack_trace** (`list[str]`): Stack trace Roboto attached to the error, or an empty list when it attached none.

#### RobotoDomainException.from_client_error()

```python
@staticmethod
def from_client_error(error: roboto.exceptions.http.HttpError) -> RobotoDomainException
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L131-L196)

Convert an HTTP error response from Roboto into the matching exception.

The request methods of [`RobotoClient`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient) convert every error response through it, so most code never calls it. When the response body is an error envelope that `from_json` recognizes, this returns the exception the envelope names. Otherwise it picks one by HTTP status:

- 400: `RobotoNoOrgProvidedException` when the message says the request named no organization, otherwise `RobotoInvalidRequestException`.
- 401 or 403: `RobotoAuthenticationFailureException` when Roboto rejected the caller's token, otherwise `RobotoUnauthorizedException`.
- 404: `RobotoDeviceNotFoundException` or `RobotoDatasetNotFoundException` when the message names one, otherwise `RobotoNotFoundException`.
- 409: `RobotoConflictException`.
- 500 to 599: `RobotoServiceException`.

**Parameters**

- **error** (`roboto.exceptions.http.HttpError`): HTTP error a request to Roboto raised.

**Raises**

- [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException): The response's status code is not a standard HTTP status.
- [`HttpError`](/docs/reference/python-sdk/roboto/exceptions/http#roboto.exceptions.http.HttpError): The response's status is none of those above. `error` itself is re-raised.

**Returns**

- `RobotoDomainException`

#### RobotoDomainException.from_json()

```python
@staticmethod
def from_json(
    contents: dict[str, Any],
    headers: dict[str, str] = {},
) -> RobotoDomainException
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L74-L114)

Build the exception an error envelope describes.

**Parameters**

- **contents** (`dict[str, Any]`): Error envelope, `{"error": {"error_code": ..., "message": ...}}`. Every other field of `error` is passed to the subclass's constructor as a keyword argument.
- **headers** (`dict[str, str]`): HTTP headers of the response that carried the envelope.

**Returns**

- `RobotoDomainException`: An instance of the subclass whose name is the envelope's `error_code`.

**Raises**

- `ValueError`: The envelope lacks `error_code` or `message`, or `error_code` names no subclass in this release of the SDK.
- `TypeError`: The envelope has a field the subclass's constructor does not accept.

#### RobotoDomainException.from_json_string()

```python
@staticmethod
def from_json_string(contents: str) -> RobotoDomainException
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L117-L128)

Build the exception that an error envelope, as JSON text, describes.

Parses `contents` and passes it, without headers, to `from_json`, whose failures also apply.

**Parameters**

- **contents** (`str`): Error envelope as JSON text.

**Raises**

- `ValueError`: `contents` is not JSON.

**Returns**

- `RobotoDomainException`

#### RobotoDomainException.serialize()

```python
def serialize() -> str
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L238-L240)

Render the envelope from `to_dict` as JSON text.

**Returns**

- `str`

#### RobotoDomainException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L227-L236)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoExpiredException

```python
exception roboto.exceptions.domain.RobotoExpiredException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoExpiredException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L563-L568)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The resource the request names is missing or has expired.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoExpiredException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoFailedToGenerateException

```python
exception roboto.exceptions.domain.RobotoFailedToGenerateException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoFailedToGenerateException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L620-L631)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto failed to generate something the request asked for, such as an AI summary.

The [`StreamingAISummary`](/docs/reference/python-sdk/roboto/ai/summary#roboto.ai.summary.StreamingAISummary) that [`generate_summary()`](/docs/reference/python-sdk/roboto/domain/datasets/dataset#roboto.domain.datasets.dataset.Dataset.generate_summary) and [`get_summary()`](/docs/reference/python-sdk/roboto/domain/datasets/dataset#roboto.domain.datasets.dataset.Dataset.get_summary) return raises it from `complete_text`, `await_completion` and `text_stream` when the summary fails.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoFailedToGenerateException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoFeatureNotAvailableException

```python
exception roboto.exceptions.domain.RobotoFeatureNotAvailableException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoFeatureNotAvailableException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L336-L341)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request uses a feature that is not enabled for the caller.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoFeatureNotAvailableException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoHttpExceptionParse

```python
class roboto.exceptions.domain.RobotoHttpExceptionParse
```

`from roboto.exceptions import RobotoHttpExceptionParse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L854-L867)

Bases: `object`

Context manager that re-raises an HTTP error from its body as the matching Roboto exception.

The request methods of [`RobotoClient`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient) wrap each request in it, so most code never uses it. It converts an [`HttpError`](/docs/reference/python-sdk/roboto/exceptions/http#roboto.exceptions.http.HttpError) with `RobotoDomainException.from_client_error` and lets every other exception through unchanged.

### RobotoIllegalArgumentException

```python
exception roboto.exceptions.domain.RobotoIllegalArgumentException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoIllegalArgumentException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L357-L362)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

An argument or request parameter has a value Roboto or the SDK rejects.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoIllegalArgumentException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoInternalException

```python
exception roboto.exceptions.domain.RobotoInternalException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoInternalException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L634-L643)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto failed because of an error in its own code or data, which retrying is unlikely to fix.

When Roboto reports one, its message gives no detail beyond a trace ID that Roboto support can use to find the failure.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoInternalException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoInvalidRequestException

```python
exception roboto.exceptions.domain.RobotoInvalidRequestException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoInvalidRequestException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L365-L370)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto rejected the request as invalid, such as a request body that fails validation.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoInvalidRequestException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoInvalidStateTransitionException

```python
exception roboto.exceptions.domain.RobotoInvalidStateTransitionException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoInvalidStateTransitionException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L400-L410)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

A resource cannot reach the state an operation needs from the state it is in.

[`wait_to_be_ready()`](/docs/reference/python-sdk/roboto/domain/custom_fields/custom_field#roboto.domain.custom_fields.custom_field.CustomField.wait_to_be_ready) raises it for a custom field that fails or is deleted before it becomes ready, and [`wait_to_be_deleted()`](/docs/reference/python-sdk/roboto/domain/custom_fields/custom_field#roboto.domain.custom_fields.custom_field.CustomField.wait_to_be_deleted) for one that was never deleted or whose deletion failed.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoInvalidStateTransitionException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoLayoutConflictException

```python
exception roboto.exceptions.domain.RobotoLayoutConflictException(
    message: str,
    conflicting_layouts: list[dict[str, Any]],
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoLayoutConflictException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L500-L519)

Bases: [`RobotoConflictException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException)

Several layouts the caller can see have the name the request looks up, so the name alone picks none of them.

**Parameters**

- **message** (`str`)
- **conflicting_layouts** (`list[dict[str, Any]]`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Attributes**

- **RobotoLayoutConflictException.conflicting_layouts**: Records of the layouts that have the name, in their JSON form, so a client can ask which one was meant.

#### RobotoLayoutConflictException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L516-L519)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoLimitExceededException

```python
exception roboto.exceptions.domain.RobotoLimitExceededException(
    message: str,
    stack_trace: list[str] = [],
    *args,
    resource_name: str = 'Unknown',
    current_quantity: int = 0,
    limit_quantity: int = 0,
    **kwargs,
)
```

`from roboto.exceptions import RobotoLimitExceededException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L571-L617)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request would take the user or organization past a limit on a resource, such as AI credits.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **resource_name** (`str`)
- **current_quantity** (`int`)
- **limit_quantity** (`int`)

**Properties**

- **RobotoLimitExceededException.current_quantity** (`int`): Quantity of the resource in use when Roboto refused the request, or 0 when Roboto reported none.
- **RobotoLimitExceededException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.
- **RobotoLimitExceededException.limit_quantity** (`int`): Limit on the resource, in its own units, or 0 when Roboto reported none.
- **RobotoLimitExceededException.resource_name** (`str`): Name of the limited resource, or `"Unknown"` when Roboto named none.

#### RobotoLimitExceededException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L612-L617)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoNoOrgProvidedException

```python
exception roboto.exceptions.domain.RobotoNoOrgProvidedException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoNoOrgProvidedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L413-L418)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request needs an organization, the caller belongs to more than one, and the request named none.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoNoOrgProvidedException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoNotFoundException

```python
exception roboto.exceptions.domain.RobotoNotFoundException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoNotFoundException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L320-L325)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

A resource the request names does not exist, or the caller cannot see it.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoNotFoundException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoNotImplementedException

```python
exception roboto.exceptions.domain.RobotoNotImplementedException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoNotImplementedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L381-L386)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request asks for an operation this deployment of Roboto does not provide.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoNotImplementedException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoNotReadyException

```python
exception roboto.exceptions.domain.RobotoNotReadyException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoNotReadyException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L344-L354)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The resource the request names exists but is not ready yet, such as a query whose results are still coming.

[`get_query_results()`](/docs/reference/python-sdk/roboto/query/client#roboto.query.client.QueryClient.get_query_results) raises it for a query whose results are not available yet, and reading [`configurations`](/docs/reference/python-sdk/roboto/domain/devices/device#roboto.domain.devices.device.Device.configurations) raises it for a device whose record has no `universal_device_id`.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoNotReadyException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoOperationTimeoutException

```python
exception roboto.exceptions.domain.RobotoOperationTimeoutException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoOperationTimeoutException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L784-L789)

Bases: [`RobotoServiceTimeoutException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoServiceTimeoutException)

Roboto stopped an operation, such as a search, that ran past its time limit. Retrying may succeed.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoOperationTimeoutException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoOrgCreationRefusedException

```python
exception roboto.exceptions.domain.RobotoOrgCreationRefusedException(
    message: str,
    next_step: str,
    reason: Optional[str] = None,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoOrgCreationRefusedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L251-L290)

Bases: [`RobotoUnauthorizedException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoUnauthorizedException)

The sign-up policy of the Roboto deployment does not let the caller create an organization now.

[`create()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.create) raises it. A caller who owns as many organizations as they may gets `RobotoLimitExceededException` instead.

**Parameters**

- **message** (`str`)
- **next_step** (`str`)
- **reason** (`Optional[str]`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Attributes**

- **RobotoOrgCreationRefusedException.next_step**: What the caller can do instead of creating the organization now.

  One of `bind_org_creation_grant` (confirm their approval from the Roboto web app), `submit_access_request`, `contact_deployment_administrator`, or `use_web_app_session` (sign in to Roboto in a browser, without acting as another user).

- **RobotoOrgCreationRefusedException.reason** = `None`: Reason for the refusal: `org_creation_grant_bound_to_other_cognito_user`, or `None`.

  Roboto sets it when the caller's approval is linked to a different sign-in, and leaves it `None` otherwise.

**Properties**

- **RobotoOrgCreationRefusedException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

#### RobotoOrgCreationRefusedException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L286-L290)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoOrgEmailDomainChangeRefusedException

```python
exception roboto.exceptions.domain.RobotoOrgEmailDomainChangeRefusedException(
    message: str,
    reason: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoOrgEmailDomainChangeRefusedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L437-L468)

Bases: [`RobotoConflictException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException)

An organization's email domain cannot change as asked.

[`bind_email_domain()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.bind_email_domain), [`check_email_domain_verification()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.check_email_domain_verification), [`new_email_domain_verification_record()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.new_email_domain_verification_record), [`set_email_domain_auto_join()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.set_email_domain_auto_join) and [`start_email_domain_verification()`](/docs/reference/python-sdk/roboto/domain/orgs/org#roboto.domain.orgs.org.Org.start_email_domain_verification) raise it.

**Parameters**

- **message** (`str`)
- **reason** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Attributes**

- **RobotoOrgEmailDomainChangeRefusedException.reason**: Reason the email domain cannot change.

  One of the values of [`OrgEmailDomainChangeRefusal`](/docs/reference/python-sdk/roboto/domain/orgs/org_operations#roboto.domain.orgs.org_operations.OrgEmailDomainChangeRefusal), which describes each: `dns_record_not_found`, `held_by_another_org`, `no_verification_challenge`, or `not_verified_or_provisionally_approved`.

#### RobotoOrgEmailDomainChangeRefusedException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L465-L468)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoReadPlanExecutionException

```python
exception roboto.exceptions.domain.RobotoReadPlanExecutionException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    kind: ReadPlanExecutionErrorKind | str,
    field_path: Optional[collections.abc.Sequence[str]] = None,
    row_number: Optional[int] = None,
    **kwargs,
)
```

`from roboto.exceptions import RobotoReadPlanExecutionException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L697-L754)

Bases: [`RobotoInternalException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInternalException)

A read of a topic's data through its read plan cannot continue; `kind` says why.

A read plan is Roboto's description of which files hold a topic's data and how to decode them. `get_data_as_record_batches` of `roboto.experimental.topics.Topic`, and the `get_data` and `get_data_as_df` methods that call it, raise this while they read those files.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)
- **kind** (`ReadPlanExecutionErrorKind | str`)
- **field_path** (`Optional[collections.abc.Sequence[str]]`)
- **row_number** (`Optional[int]`)

**Properties**

- **RobotoReadPlanExecutionException.field_path** (`tuple[str, ...] | None`): Path components of the field the error concerns, or `None` for kinds that concern no field.

  For `ReadPlanExecutionErrorKind.FIELD_NOT_IN_FILE`, the missing field's path, from its top-level field down to the first component the file lacks. For `ReadPlanExecutionErrorKind.ELEMENT_COUNT_MISMATCH`, the named array's path.

  Return type: `Optional[tuple[str, ...]]`

- **RobotoReadPlanExecutionException.kind** (`ReadPlanExecutionErrorKind`): Reason the read cannot continue.

- **RobotoReadPlanExecutionException.row_number** (`int | None`): Position of the row the error concerns, from 0, among its topic's rows in its file, or `None`.

  Set for `ReadPlanExecutionErrorKind.INVALID_TIMESTAMP`, and for `ELEMENT_COUNT_MISMATCH` on a variable-length list. `None` for other kinds, and when a fixed-size list's width is refused before any row is read.

  Return type: `Optional[int]`

#### RobotoReadPlanExecutionException.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L747-L754)

Return the error as an envelope, the form that `from_json` reads.

The envelope holds `error_code` and `message`, `stack_trace` when it is not empty, and any fields the subclass adds.

**Returns**

- `dict[str, Any]`

### RobotoResponseTooLargeException

```python
exception roboto.exceptions.domain.RobotoResponseTooLargeException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoResponseTooLargeException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L757-L765)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The response to the request is larger than Roboto can send.

Retrying the same request fails the same way; request less data at a time.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoResponseTooLargeException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoServiceException

```python
exception roboto.exceptions.domain.RobotoServiceException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoServiceException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L551-L552)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto failed unexpectedly.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

### RobotoServiceTimeoutException

```python
exception roboto.exceptions.domain.RobotoServiceTimeoutException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions.domain import RobotoServiceTimeoutException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L776-L781)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto ran out of time while processing the request. Retrying may succeed.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoServiceTimeoutException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoServiceUnavailableException

```python
exception roboto.exceptions.domain.RobotoServiceUnavailableException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoServiceUnavailableException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L768-L773)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto could not accept the request, such as under heavy load. Retrying later may succeed.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoServiceUnavailableException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoThreadReadOnlyException

```python
exception roboto.exceptions.domain.RobotoThreadReadOnlyException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoThreadReadOnlyException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L293-L309)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

A message was sent to a thread with Roboto's AI that a conversation outside Roboto, such as in Slack, owns.

Such a thread is mirrored into that conversation, so Roboto refuses new messages to it over the API, which would leave the mirror incomplete. Its `origin` names the owner, such as [`SLACK`](/docs/reference/python-sdk/roboto/ai/core/record#roboto.ai.core.record.ThreadOrigin.SLACK). The caller can still read, cancel, and rate the thread, and forking it gives a copy that accepts messages. [`send()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.send) and [`send_text()`](/docs/reference/python-sdk/roboto/ai/agent_thread/agent_thread#roboto.ai.agent_thread.agent_thread.AgentThread.send_text) raise it.

Roboto responds with HTTP 403, but this is not a permission failure and does not subclass `RobotoUnauthorizedException`: who the caller is does not change the answer, so offer to fork the thread rather than to sign in again.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoThreadReadOnlyException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoUnauthorizedException

```python
exception roboto.exceptions.domain.RobotoUnauthorizedException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoUnauthorizedException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L243-L248)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The caller lacks permission for the request.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoUnauthorizedException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoUnknownFieldAddressException

```python
exception roboto.exceptions.domain.RobotoUnknownFieldAddressException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoUnknownFieldAddressException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L373-L378)

Bases: [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException)

A `roboto.experimental.topics.FieldAddress` names a `path` or `field_id` the topic's schema lacks.

`get_data_as_record_batches` of `roboto.experimental.topics.Topic`, and the `get_data` and `get_data_as_df` methods that call it, raise it for an address in `fields_include` or `fields_exclude`.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

### RobotoUnknownOperationException

```python
exception roboto.exceptions.domain.RobotoUnknownOperationException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoUnknownOperationException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L555-L560)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

The request names an API route Roboto does not serve.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)

**Properties**

- **RobotoUnknownOperationException.http_status_code** (`int`): HTTP status Roboto responds with when it reports this error.

### RobotoUnrecognizedErrorException

```python
exception roboto.exceptions.domain.RobotoUnrecognizedErrorException(
    message: str,
    stack_trace: list[str] = [],
    headers: dict[str, str] = {},
    error_code: Optional[str] = None,
    *args,
    **kwargs,
)
```

`from roboto.exceptions import RobotoUnrecognizedErrorException`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/exceptions/domain.py#L819-L851)

Bases: [`RobotoDomainException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoDomainException)

Roboto reported an error that this release of the SDK cannot match to a specific exception class.

Reported for an element of a [`BatchResponse`](/docs/reference/python-sdk/roboto/http/response#roboto.http.response.BatchResponse) whose error names a code this release defines no class for, or that arrived without a code, without a message, or as text that is not an error envelope at all. It carries whatever code and message Roboto sent, so a caller handling the failure still learns what went wrong; when no message could be read, the message is the error's raw text. [`create_session()`](/docs/reference/python-sdk/roboto/domain/devices/device#roboto.domain.devices.device.Device.create_session) raises it, and [`create_sessions()`](/docs/reference/python-sdk/roboto/domain/devices/device#roboto.domain.devices.device.Device.create_sessions) lists it in the batch's [`failed`](/docs/reference/python-sdk/roboto/http/response#roboto.http.response.BatchResponse.failed).

The error envelope carries no status code, so `http_status_code` reports the 500 inherited from `RobotoDomainException` rather than the status the failure had.

**Parameters**

- **message** (`str`)
- **stack_trace** (`list[str]`)
- **headers** (`dict[str, str]`)
- **error_code** (`Optional[str]`)

**Properties**

- **RobotoUnrecognizedErrorException.error_code** (`str`): Code Roboto sent, or the name of this class when the error arrived without one.
