friendlier error message

This commit is contained in:
David Kennedy 2024-12-30 10:56:04 -05:00
parent d36e2e2a63
commit d7493cc205
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 8 additions and 9 deletions

View file

@ -46,9 +46,8 @@ class AlreadyDomainInvitedError(InvitationError):
class MissingEmailError(InvitationError):
"""Raised when the requestor has no email associated with their account."""
def __init__(self, username):
super().__init__(f"Can't send invitation email. No email is associated with the account for '{username}'.")
self.username = username
def __init__(self):
super().__init__("Can't send invitation email. No email is associated with your user account.")
class OutsideOrgMemberError(ValueError):