Skip to content

ot_exceptions

korobka.opentrons.ot_exceptions ¤

Exceptions raised by this module.

Classes¤

ActionRejected(status_code, info) ¤

Bases: OTDriverError

The agent refused the submission (busy, malformed, or not ready).

Stores HTTP status code and payload returned by the agent.

Source code in korobka/opentrons/ot_exceptions.py
46
47
48
49
50
def __init__(self, status_code: int, info: Any):
    """Stores HTTP status code and payload returned by the agent."""
    super().__init__(f"agent rejected action ({status_code}): {info}")
    self.status_code = status_code
    self.info = info
Methods:¤

BootstrapFailed ¤

Bases: OTDriverError

Session creation reached the backend but the agent never came up.

JobFailed(snapshot) ¤

Bases: OTDriverError

A job terminated in the failed status.

Stores the terminal snapshot returned by the agent.

Source code in korobka/opentrons/ot_exceptions.py
56
57
58
59
def __init__(self, snapshot: Mapping[str, Any]):
    """Stores the terminal snapshot returned by the agent."""
    super().__init__(f"job {snapshot.get('job_id')} failed: {snapshot.get('error')}")
    self.snapshot = dict(snapshot)
Methods:¤

OTDriverError ¤

Bases: RuntimeError

Base class for all client-side errors raised by this module.

ProxyError(status_code, detail) ¤

Bases: OTDriverError

The proxy returned an unexpected status code.

Stores HTTP status code and detail string from the response.

Source code in korobka/opentrons/ot_exceptions.py
20
21
22
23
24
def __init__(self, status_code: int, detail: str):
    """Stores HTTP status code and detail string from the response."""
    super().__init__(f"proxy returned {status_code}: {detail}")
    self.status_code = status_code
    self.detail = detail
Methods:¤

ProxyUnreachable ¤

Bases: OTDriverError

The proxy could not be contacted (connection refused, DNS, timeout).

RobotBusy ¤

Bases: OTDriverError

The requested robot is already occupied by another session.

SessionNotActive ¤

Bases: OTDriverError

The session has not been opened, or has already been closed.

UnknownRobot ¤

Bases: OTDriverError

The proxy/backend does not recognise the requested robot_id.