from api.domain import DomainError class UserNotFoundError(DomainError): ... class UserValidationError(DomainError): ... class UserInvalidCredentialsError(DomainError): ... class UserAlreadyExistsError(DomainError): ... class UserIsNotAuthorizedError(DomainError): ...