Added docs

This commit is contained in:
Adrià Casajús 2022-05-12 18:36:12 +02:00
parent 9066116b7e
commit 39b035a123
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
1 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,13 @@ def email_validator():
def create_contact(user: User, alias: Alias, contact_address: str) -> Contact:
"""
Create a contact for a user. Can be restricted for new free users by enabling DISABLE_CREATE_CONTACTS_FOR_FREE_USERS.
Can throw exceptions:
- ErrAddressInvalid
- ErrContactAlreadyExists
- ErrContactUpgradeNeeded - If DISABLE_CREATE_CONTACTS_FOR_FREE_USERS this exception will be raised for new free users
"""
if not contact_address:
raise ErrAddressInvalid("Empty address")
try: