Exceptions
Types of exceptions that can be raised when using the AARS library. All exceptions are subclasses of AlephError.
AlephError
Bases: Exception
Base class for exceptions in this module.
AlephPermissionError(user_address: str, item_hash: str, item_owner: str, message = 'User {0} is not authorized to modify {1} by user {2}')
Bases: AlephError
Exception raised when a user is not authorized to perform an action on an item.
Source code in aars/exceptions.py
15 16 17 18 19 20 21 22 23 24 |
|
AlreadyForgottenError(content, message = "Object '{0}' has already been forgotten. It is recommended to delete the called object locally.")
Bases: AlephError
Exception raised when a user tries to forget an item that has already been forgotten.
Source code in aars/exceptions.py
43 44 45 46 47 48 49 50 51 |
|
AlreadyUsedError(message = 'PageableResponse has already been iterated over. It is recommended to to store the result of all() or page() or to create a new query.')
Bases: AlephError
Exception raised when a PageableResponse has already been used.
Source code in aars/exceptions.py
30 31 32 33 34 35 36 |
|
InvalidMessageTypeError(received, expected, message = "Expected message type '{0}' but actually received '{1}'")
Bases: AlephError
Exception raised when program received a different message type than expected.
Source code in aars/exceptions.py
75 76 77 78 79 80 81 82 83 84 |
|
NotStoredError(record, message = "Record '{0}'\nis not stored on Aleph. It is required to store the record with .save() before calling this method.")
Bases: AlephError
Exception raised when a requested object is not stored on Aleph and has no item_hash
.
Source code in aars/exceptions.py
90 91 92 93 94 95 96 97 98 |
|
PostTypeIsNoClassError(content, message = "Received post_type '{0}' from channel '{1}' does not currently exist as a class.")
Bases: AlephError
Exception raised when a received post_type is not resolvable to any python class in current runtime.
Source code in aars/exceptions.py
57 58 59 60 61 62 63 64 65 66 67 68 69 |
|