Skip to content

autonomy.chain.exceptions

Custom exceptions for chain module.

get_requests_connection_error

@lru_cache(maxsize=1)
def get_requests_connection_error() -> Type[BaseException]

Return requests.exceptions.ConnectionError.

web3's HTTPProvider uses requests internally, and requests is installed transitively with open-aea-ledger-ethereum. Resolved lazily and cached so repeated except clause evaluations avoid re-importing. Unrelated importers of this module work without the plugin; any call that actually reaches a chain-side except without the plugin raises here with a clear install hint, matching the load_hwi_plugin pattern in autonomy.chain.config.

Raises:

  • ImportError: if the Ethereum ledger plugin is not installed.

Returns:

the requests.exceptions.ConnectionError class.

ChainInteractionError Objects

class ChainInteractionError(Exception)

Base chain interaction failure.

RPCError Objects

class RPCError(ChainInteractionError)

RPC error.

TxBuildError Objects

class TxBuildError(ChainInteractionError)

Tx build error.

TxSettleError Objects

class TxSettleError(ChainInteractionError)

Tx settle error.

TxVerifyError Objects

class TxVerifyError(ChainInteractionError)

Tx settle error.

ChainTimeoutError Objects

class ChainTimeoutError(ChainInteractionError)

Timeout error for interecting with chain.

ComponentMintFailed Objects

class ComponentMintFailed(ChainInteractionError)

Raise when component minting fails.

FailedToRetrieveComponentMetadata Objects

class FailedToRetrieveComponentMetadata(ChainInteractionError)

Raise when component metadata retrieving fails.

DependencyError Objects

class DependencyError(ChainInteractionError)

Raise when component dependency check fails.

InvalidMintParameter Objects

class InvalidMintParameter(ChainInteractionError)

Raise when the parameter provided for minting a component is invalid

ServiceRegistrationFailed Objects

class ServiceRegistrationFailed(ChainInteractionError)

Raise when service activation fails.

InstanceRegistrationFailed Objects

class InstanceRegistrationFailed(ChainInteractionError)

Raise when instance registration fails.

ServiceDeployFailed Objects

class ServiceDeployFailed(ChainInteractionError)

Raise when service activation fails.

TerminateServiceFailed Objects

class TerminateServiceFailed(ChainInteractionError)

Raise when service termination fails.

RecoverServiceMultisigFailed Objects

class RecoverServiceMultisigFailed(ChainInteractionError)

Raise when service multisig recovery fails.

UnbondServiceFailed Objects

class UnbondServiceFailed(ChainInteractionError)

Raise when service unbond call fails.