mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
more updates and fixes to invitation logging and exception handling
This commit is contained in:
parent
6634e9bad8
commit
dfb7c6d875
3 changed files with 3 additions and 4 deletions
|
@ -85,7 +85,7 @@ def send_emails_to_domain_managers(email: str, requestor_email, domain: Domain,
|
|||
},
|
||||
)
|
||||
except EmailSendingError as err:
|
||||
logger.warning(f"Could not send email manager notification to {user.email} for domain: {domain.name}")
|
||||
logger.warning(f"Could not send email manager notification to {user.email} for domain: {domain.name}", exc_info=True)
|
||||
all_emails_sent = False
|
||||
return all_emails_sent
|
||||
|
||||
|
|
|
@ -801,7 +801,7 @@ class PortfolioAddMemberView(PortfolioMembersPermissionView, FormMixin):
|
|||
portfolio,
|
||||
exc_info=True,
|
||||
)
|
||||
messages.warning(self.request, "Could not send email invitation.")
|
||||
messages.warning(self.request, "Could not send portfolio email invitation.")
|
||||
elif isinstance(exception, MissingEmailError):
|
||||
messages.error(self.request, str(exception))
|
||||
logger.error(
|
||||
|
@ -810,4 +810,4 @@ class PortfolioAddMemberView(PortfolioMembersPermissionView, FormMixin):
|
|||
)
|
||||
else:
|
||||
logger.warning("Could not send email invitation (Other Exception)", exc_info=True)
|
||||
messages.warning(self.request, "Could not send email invitation.")
|
||||
messages.warning(self.request, "Could not send portfolio email invitation.")
|
||||
|
|
|
@ -68,7 +68,6 @@ def handle_invitation_exceptions(request, exception, email):
|
|||
logger.error(str(exception), exc_info=True)
|
||||
elif isinstance(exception, OutsideOrgMemberError):
|
||||
messages.error(request, str(exception))
|
||||
logger.warning(str(exception), exc_info=True)
|
||||
elif isinstance(exception, AlreadyDomainManagerError):
|
||||
messages.error(request, str(exception))
|
||||
elif isinstance(exception, AlreadyDomainInvitedError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue