Skip to content
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

Add error message when notification size > 256KB #2025

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Jan 2, 2025

Summary | Résumé

This PR adds a front end error message, with guidance, when attempting to send a one off notification that exceeds the SQS size limit of 256KB.

image

Related work

Test instructions | Instructions pour tester la modification

Pull and run the above API PR when testing locally. From the UI there are only a couple scenarios where a notification can reach the 256KB limit by using variables in one-offs. This is because:

  • The email content and subject fields have character limit validation.
  • Files can only be attached when using the API.
  • Our RecipientCSV class has built in validation on column values and overall content length that prevent users from reaching the 256KB limit when performing bulk sends.

Test 1

  1. Create an email template using template_content.txt
  2. Send using that template with this content for the variable var1_content.txt
  3. Note the error message that guides you to the largest variable in your message

Test 2

  1. Edit your template, adding two more variables
  2. Chunk the above var1_content.txt into 3 and insert them into the newly added variables, keeping track of which variable holds the largest chunk
  3. Attempt the send again and note that the largest variable is specified in the error message

Copy link

github-actions bot commented Jan 2, 2025

Comment on lines +2035 to +2036
"{} holds the most content. You may be able to send your message if you reduce or remove that content.","FR: {} holds the most content. You may be able to send your message if you reduce or remove that content."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Your message exceeds the size limit of 256KB","FR: Your messages exceeds the size limit of 256KB"
"{} holds the most content. You may be able to send your message if you reduce or remove that content.","FR: {} holds the most content. You may be able to send your message if you reduce or remove that content."
"Your message exceeds the size limit of 256KB","Votre message dépasse la limite de taille de 256 Ko"
"{} holds the most content. You may be able to send your message if you reduce or remove that content.","{} contient le plus de contenu. Vous pourriez être en mesure d’envoyer votre message si vous réduisez ou supprimez ce contenu."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants