roboto.exceptions.domain#

Module Contents#

roboto.exceptions.domain.AUTHENTICATION_FAILURE_MESSAGE = 'Authentication to Roboto failed. This generally happens if the value in your...#
exception roboto.exceptions.domain.RobotoAuthenticationFailureException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when authentication fails

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoConditionException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown if there is a failed condition

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoConflictException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown if there is a conflict between a resource you’re creating and another existing resource

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoContextTooLongException(message, stack_trace=[], headers={}, estimated_tokens=0, max_tokens=0, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when the conversation context (messages, system prompt, tool results) exceeds the model’s context window limit.

Internal heuristic estimates and the model’s context limit are recorded in structured CloudWatch logs (see BedrockLLMBackbone); they are deliberately not surfaced through this exception. Callers that need usage telemetry should consume it through dedicated channels rather than introspecting the error.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

  • estimated_tokens (int)

  • max_tokens (int)

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoDatasetNotFoundException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoNotFoundException

Specialization of RobotoNotFoundException for datasets.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

exception roboto.exceptions.domain.RobotoDeprecatedException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when an old API endpoint is called, to tell the client to upgrade

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoDeviceNotFoundException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoNotFoundException

Specialization of RobotoNotFoundException for devices.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

exception roboto.exceptions.domain.RobotoDomainException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: Exception

Expected exceptions from the Roboto domain entity objects.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property error_code: str#
Return type:

str

static from_client_error(error)#
Parameters:

error (roboto.exceptions.http.HttpError)

Return type:

RobotoDomainException

static from_json(contents, headers={})#
Parameters:
  • contents (dict[str, Any])

  • headers (dict[str, str])

Return type:

RobotoDomainException

static from_json_string(contents)#
Parameters:

contents (str)

Return type:

RobotoDomainException

property headers: dict[str, str]#
Return type:

dict[str, str]

property http_status_code: int#
Return type:

int

property message: str#
Return type:

str

serialize()#
Return type:

str

property stack_trace: list[str]#
Return type:

list[str]

to_dict()#
Return type:

dict[str, Any]

exception roboto.exceptions.domain.RobotoExpiredException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown if a resource is missing or expired.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoFailedToGenerateException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when Roboto fails to generate a resource due to an internal error.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoFeatureNotAvailableException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when a route is gated by a feature flag that is not enabled for the caller.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

class roboto.exceptions.domain.RobotoHttpExceptionParse#

Bases: object

exception roboto.exceptions.domain.RobotoIllegalArgumentException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when request parameters are in some way invalid

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoInternalException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when Roboto throws an unexpected internal error, expected to be systemic.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoInvalidRequestException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when request parameters are in some way invalid

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoInvalidStateTransitionException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when requesting update of state to an invalid state, or via an invalid transition path

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoLayoutConflictException(message, conflicting_layouts, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoConflictException

Thrown when multiple layouts with the same name are found and need disambiguation. Contains the conflicting layout records for client handling.

Parameters:
  • message (str)

  • conflicting_layouts (list[dict[str, Any]])

  • stack_trace (list[str])

  • headers (dict[str, str])

conflicting_layouts#
to_dict()#
Return type:

dict[str, Any]

exception roboto.exceptions.domain.RobotoLimitExceededException(message, stack_trace=[], *args, resource_name='Unknown', current_quantity=0, limit_quantity=0, **kwargs)#

Bases: RobotoDomainException

Thrown if an operation would exceed a user or org level limit.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • resource_name (str)

  • current_quantity (int)

  • limit_quantity (int)

property current_quantity: int#
Return type:

int

property http_status_code: int#
Return type:

int

property limit_quantity: int#
Return type:

int

property resource_name: str#
Return type:

str

to_dict()#
Return type:

dict[str, Any]

exception roboto.exceptions.domain.RobotoNoOrgProvidedException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when no org is provided to an operation which requires an org.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoNotFoundException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Throw when a requested resource does not exist

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoNotImplementedException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown by shimmed out APIs which have not yet been implemented

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoNotReadyException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Throw when a requested resource is resolvable by ID/context but is not fully initialized or ready to be served.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoResponseTooLargeException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when the server cannot complete the request because the response payload exceeds a storage or transport capacity limit (e.g., Lambda response size). This is NOT expected to be transient and should NOT be retried.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoServiceException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when Roboto Service failed in an unexpected way

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

exception roboto.exceptions.domain.RobotoServiceTimeoutException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when the service times out while processing a request. This is exepcted to be transient and ought to be retried.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoServiceUnavailableException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when a service is unavailable, such as when it’s under heavy load and can’t accept new requests. This is expected to be transient and ought to be retried.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoStatementTimeoutException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoServiceTimeoutException

Raised when a persistence-layer query is aborted by our own bounded timeout.

Persistence layer adapters apply a per-query budget on opt-in code paths (e.g. post-turn cleanup, agent tool slots) so a stuck query cannot consume the whole worker invocation. When that budget fires, the adapter aborts the statement and re-casts the underlying driver cancellation into this exception, so callers never see psycopg (or any other SQL driver) leak through the repo boundary.

Treat it as an expected operational signal: log at WARNING and either degrade (partial response, “timed out” sidecar) or skip the optional follow-up work — not as a bug to page on.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoUnauthorizedException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown when a user is attempting to access a resource that they do not have permission to access

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int

exception roboto.exceptions.domain.RobotoUnknownOperationException(message, stack_trace=[], headers={}, *args, **kwargs)#

Bases: RobotoDomainException

Thrown if a user is attempting to perform an action unrecognized by the Roboto platform.

Parameters:
  • message (str)

  • stack_trace (list[str])

  • headers (dict[str, str])

property http_status_code: int#
Return type:

int