aleph.types.message_status module¶
- exception aleph.types.message_status.AmendTargetNotFound(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
RetryMessageExceptionThe original post for an amend could not be found.
- exception aleph.types.message_status.CannotAmendAmend(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe original post targeted by an amend is an amend itself, which is forbidden.
- exception aleph.types.message_status.CannotForgetForgetMessage(target_hash: str)[source]¶
Bases:
InvalidMessageExceptionThe FORGET message targets another FORGET message, which is forbidden.
- class aleph.types.message_status.ErrorCode(*values)[source]¶
Bases:
IntEnum- BALANCE_INSUFFICIENT = 5¶
- CONTENT_UNAVAILABLE = 3¶
- CREDIT_INSUFFICIENT = 6¶
- FILE_UNAVAILABLE = 4¶
- FORGET_FORGET = 502¶
- FORGET_NOT_ALLOWED = 503¶
- FORGET_NO_TARGET = 500¶
- FORGET_TARGET_NOT_FOUND = 501¶
- FORGOTTEN_DUPLICATE = 504¶
- INTERNAL_ERROR = -1¶
- INVALID_FORMAT = 0¶
- INVALID_PAYMENT_METHOD = 202¶
- INVALID_SIGNATURE = 1¶
- PERMISSION_DENIED = 2¶
- POST_AMEND_AMEND = 102¶
- POST_AMEND_NO_TARGET = 100¶
- POST_AMEND_TARGET_NOT_FOUND = 101¶
- STORE_REF_NOT_FOUND = 200¶
- STORE_UPDATE_UPDATE = 201¶
- VM_AMEND_NOT_ALLOWED = 302¶
- VM_REF_NOT_FOUND = 300¶
- VM_UPDATE_UPDATE = 303¶
- VM_VOLUME_NOT_FOUND = 301¶
- VM_VOLUME_TOO_SMALL = 304¶
- exception aleph.types.message_status.FileNotFoundException(file_hash: str, details: str | None = None)[source]¶
Bases:
RetryMessageExceptionA file required to process the message could not be found, locally and/or on the network.
Bases:
FileNotFoundExceptionA file pointed to by the message is not available at the moment.
- exception aleph.types.message_status.ForgetNotAllowed(file_hash: str, vm_hash: str)[source]¶
Bases:
InvalidMessageExceptionThe store message targeted by the ref field has a value in the ref field of a dependent volume.
- exception aleph.types.message_status.ForgetTargetNotFound(target_hash: str | None = None, aggregate_key: str | None = None)[source]¶
Bases:
RetryMessageExceptionA target specified in the FORGET message could not be found.
- exception aleph.types.message_status.InsufficientBalanceException(balance: Decimal, required_balance: Decimal)[source]¶
Bases:
InvalidMessageExceptionThe user does not have enough Aleph tokens to process the message.
- exception aleph.types.message_status.InsufficientCreditException(credit_balance: int, required_credits: Decimal, min_runtime_days: int = 1)[source]¶
Bases:
InvalidMessageExceptionThe user does not have enough Aleph credits to process the message.
- exception aleph.types.message_status.InternalError(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
RetryMessageExceptionAn unexpected situation occurred.
- exception aleph.types.message_status.InvalidMessageException(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
MessageProcessingExceptionThe message is invalid and should be rejected.
- exception aleph.types.message_status.InvalidMessageFormat(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe message is invalid because it is not properly formatted: missing field(s), incorrect value types, etc.
- exception aleph.types.message_status.InvalidPaymentMethod(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionMessages with non-credit payment types are no longer allowed after the cutoff. Only credit payment is supported for STORE, INSTANCE, and PROGRAM messages.
- exception aleph.types.message_status.InvalidSignature(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe message is invalid, in particular because its signature does not match the expected value.
Bases:
FileNotFoundExceptionThe message content is not available at the moment (storage/IPFS item types).
- class aleph.types.message_status.MessageOrigin(*values)[source]¶
-
- IPFS = 'ipfs'¶
- ONCHAIN = 'onchain'¶
- P2P = 'p2p'¶
- exception aleph.types.message_status.MessageProcessingException(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
Exception
- class aleph.types.message_status.MessageProcessingStatus(*values)[source]¶
-
- FAILED_REJECTED = 'rejected'¶
- FAILED_WILL_RETRY = 'retry'¶
- PROCESSED_CONFIRMATION = 'confirmed'¶
- PROCESSED_NEW_MESSAGE = 'processed'¶
- to_message_status() MessageStatus[source]¶
- class aleph.types.message_status.MessageStatus(*values)[source]¶
-
- FORGOTTEN = 'forgotten'¶
- PENDING = 'pending'¶
- PROCESSED = 'processed'¶
- REJECTED = 'rejected'¶
- REMOVED = 'removed'¶
- REMOVING = 'removing'¶
- exception aleph.types.message_status.NoAmendTarget(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionA POST with type = amend does not specify a value in the ref field.
- exception aleph.types.message_status.NoForgetTarget(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe FORGET message specifies nothing to forget.
- exception aleph.types.message_status.PermissionDenied(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe sender does not have the permission to perform the requested operation on the specified object.
- class aleph.types.message_status.RemovedMessageReason(*values)[source]¶
-
- BALANCE_INSUFFICIENT = 'balance_insufficient'¶
- CREDIT_INSUFFICIENT = 'credit_insufficient'¶
- exception aleph.types.message_status.RetryMessageException(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
MessageProcessingExceptionThe message should be retried.
- exception aleph.types.message_status.StoreCannotUpdateStoreWithRef(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe store message targeted by the ref field has a value in the ref field itself. Update trees are not supported.
- exception aleph.types.message_status.StoreRefNotFound(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
RetryMessageExceptionThe original store message hash specified in the ref field could not be found.
- exception aleph.types.message_status.VmCannotUpdateUpdate(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe program hash in the replaces field has a value for the replaces field itself. Update trees are not supported.
- exception aleph.types.message_status.VmRefNotFound(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
RetryMessageExceptionThe original program specified in the ref field could not be found.
- exception aleph.types.message_status.VmUpdateNotAllowed(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
InvalidMessageExceptionThe message attempts to amend an immutable program, i.e. for which allow_amend is set to False.
- exception aleph.types.message_status.VmVolumeNotFound(errors: str | Sequence[Any] | None = None)[source]¶
Bases:
RetryMessageExceptionOne or more volume files could not be found.
- exception aleph.types.message_status.VmVolumeTooSmall(volume_name: str, volume_size: int, parent_ref: str, parent_file: str, parent_size: int)[source]¶
Bases:
InvalidMessageExceptionA volume with a parent volume has a size inferior to the size of the parent. Ex: attempting to use a 4GB Ubuntu rootfs to a 2GB volume.