-
Notifications
You must be signed in to change notification settings - Fork 26
#3940: Update messages for adding a domain manager - [aa] #4225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…es-for-domain-manager
🥳 Successfully deployed to developer sandbox aa. |
1 similar comment
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
exc_info=True, | ||
) | ||
raise EmailSendingError(f"Could not send email invitation to {email} for domains: {domain_names}") from err | ||
raise EmailSendingError(f"An unexpected error occurred: {email} could not be added to this domain.") from err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also noticed the spreadsheet also includes " Try again and contact us if the problem persists."
but feel free to ignore if that's outdated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert006: Feel free to ignore below but flagging just for documentation that this error can be prompted without inviting the user to an organization
I noticed the Mural said this event should result in 2 error messages: dm-add-alert005 and dm-add-alert006 (I think the dm-add-alert006 alert message on the Mural also is different from the message in the spreadsheet, but assuming spreadsheet is the source of truth).
However, when I prompt dm-add-alert006, I do not get dm-add-alert005. But would it make sense to show dm-add-alert005 here? In this case we didn't invite the user to the organization (no domain invitation was made) so I may also be prompting this message in a different way than originally intended.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also keeping that screenshot to verify we successfully concat the contact us message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert013: Correct alert message update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments but let me know if things have changed from the spreadsheet sections I reference, since you've been working on this more closely!
🥳 Successfully deployed to developer sandbox aa. |
src/registrar/utility/errors.py
Outdated
|
||
def __init__(self, email): | ||
super().__init__(f"{email} is already a manager for this domain.") | ||
super().__init__(f"An unexpected error occurred: {email} could not be added to this domain.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recapping our call: I think this error message doesn't need to be changed and can be reverted to the original message!
raise EmailSendingError( | ||
f"Could not sent email invitation to {email} for portfolio {portfolio}. Portfolio invitation not saved." | ||
) from err | ||
raise EmailSendingError(f"An unexpected error occurred: {email} could not be added to this domain.") from err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert001: typo fixed
🥳 Successfully deployed to developer sandbox aa. |
# Default message if no additional info is provided | ||
message = "Can't send invitation email. No email is associated with your user account." | ||
|
||
# Customize message based on provided arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert002: Remove email, domain, and portfolio from error messages and replace with single, generic message.
messages.error(request, str(exception)) | ||
elif isinstance(exception, IntegrityError): | ||
messages.error(request, f"{email} is already a manager for this domain") | ||
messages.error(request, f"An unexpected error occurred: {email} could not be added to this domain.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert003: Correct generic IntegrityError message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert012: Correct generic IntegrityError message
else: | ||
logger.warning("Could not send email invitation (Other Exception)", exc_info=True) | ||
messages.error(request, "Could not send email invitation.") | ||
messages.error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert004: Update to generic error message
portfolio_invitation.retrieve() | ||
portfolio_invitation.save() | ||
messages.success(request, f"{requested_email} has been invited to the organization: {domain_org}") | ||
messages.success(request, f"{requested_email} has been invited to become a member of {domain_org}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ dm-add-alert005: Noticed that when we add a domain manager who is not yet a member of the domain's organization, we have 2 error messages. The first one is the correctly updated alert message, but I was wondering if we should be seeing that bottom one as well? It doesn't match any of the error messages from 006-010

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if the messages and alert type (success + failure) may be confusing or contradictory but @witha-k @SamiyahKey will defer to your judgment since you're more well-versed in this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is intended per @witha-k 's conversations with me. Tagging @SamiyahKey as backup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it still makes sense to keep both. It's letting the user know that whomever they added was not a member of this organization (which is why a domain invitation could not be sent) and that an portfolio invitation to join the organization was sent instead. Otherwise, the user might not know why a domain invitation was not sent. And if we don't keep the success message, they might not know that a portfolio invitation was sent instead...
messages.error(self.request, str(exception)) | ||
logger.error( | ||
f"Can't send email to '{email}' for portfolio '{portfolio}'. No email exists for the requestor.", | ||
"Can't send invitation email. No email is associated with your account.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert007: Update alert message language
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requested_user=requested_user, | ||
): | ||
messages.warning(request, "Could not send email confirmation to existing domain managers.") | ||
messages.warning(request, "Could not send email notification to existing domain managers.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ dm-add-alert011: alert message updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the add manager alerts which had requested changes on the spreadsheet! Had a couple questions that I marked with ❓ and change requests marked with 🔄 . Happy to go over these together if that's easier or if I misunderstood anything!
🥳 Successfully deployed to developer sandbox aa. |
🥳 Successfully deployed to developer sandbox aa. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferring to design on dm-add-alert005 - thank you for handling everything thoroughly!
…es-for-domain-manager
🥳 Successfully deployed to developer sandbox aa. |
Ticket
Resolves #3940
Changes
Context for reviewers
There are certain cases in which domain manager updates should not be allowed. Review the story's mural and excel, linked here for convenience.
spreadsheet
Mural
Examples:
Setup
Create a domain that you manage if one does not already exist
Execute workflows in the mural/excel above... for example:
Repeat such tests for the 12 error message updates.
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots