-
Notifications
You must be signed in to change notification settings - Fork 0
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
BUG: missing email subject personalization throws errors #135
Comments
The issue stems from subjects not being checked for "missing data". That's how we currently report this error when data is missing from the content/body. Since this fails to check for missing data it makes it through the validation checks, then fails when attempting to send. The utils The problem is our API code calls
Probable solution: @property
def missing_data(self):
return [placeholder_name for placeholder_name in Field(self.content + self._subject).placeholder_names if self.values.get(placeholder_name) is None]
) It may be more complicated because the base class |
Hey team! Please add your planning poker estimate with Zenhub @babyjunior56 @cris-oddball @EvanParish @k-macmillan @kalbfled @ldraney @nikolai-efimov |
Whoever picks this up, please sync with Kyle first (unless his notes above are clear for you). |
Alert the team asap if unit test-related work begins to get out of hand. |
okay to keep |
Description
When sending an email using a template that has a subject personalization and that subject personalization is not sent in the POST payload, one of two things may happen:
NullValueForNonConditionalPlaceholderException
was raised.Either way, the service does not correctly handle the missing payload fields for email subjects.
Unclear if this is a Utils repo issue, which it may be based on the logs seen.
Steps to Reproduce
First Condition: Email template has personalization fields in the subject and body.
VANotify Service, template ID
b2c9ff49-b37b-4352-ab0c-3d3d0710fe4c
The Happy Path payload would be
b2c9ff49-b37b-4352-ab0c-3d3d0710fe4c
A notification ID will be found in the logs, the sequence is something like this (or just search for
NullValueForNonConditionalPlaceholderException
)There will also be a stack trace broken out over multiple lines that looks like:
Second Condition: Email template has personalization field in subject, only.
VANotify Service, template ID
64b0953c-b7ea-4b48-b70f-d242ce5b17d2
The Happy Path payload would be
64b0953c-b7ea-4b48-b70f-d242ce5b17d2
Workaround
Is there something we can do to work around this issue in the meantime?
Impact/Urgency
Medium - inconvenient at best.
This is observed in the Staging environment as well, so is unrelated to any work happening in the current sprint.
Expected Behavior
Note: The majority of the work is in utils, but there will be minimal work in API to use the new utils version and throw the appropriate validation error. Please do both together in this ticket.
QA Considerations
Additional Info & Resources
The text was updated successfully, but these errors were encountered: