[docs]
class OnegovUserError(Exception):
""" Base class for all errors raised by onegov.user. """
def __init__(self, message: str):
[docs]
class UnknownUserError(OnegovUserError):
""" Raised when a user was not found. """
[docs]
class InvalidActivationTokenError(OnegovUserError):
""" Raised when the given activation token doesn't match. """
[docs]
class ExistingUserError(OnegovUserError):
""" Raised when a new user already exists. """
[docs]
class AlreadyActivatedError(OnegovUserError):
""" Raised when a user was already activated. """
[docs]
class ExpiredSignupLinkError(OnegovUserError):
""" Raised when the signup link in use has expired. """
def __init__(self) -> None:
pass
[docs]
class InsecurePasswordError(OnegovUserError):
""" Raised when a user's password is not secure enough. """
def __init__(self) -> None:
pass