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 for rows_with_combined_variable_content_too_long #2160

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Apr 23, 2024

Summary | Résumé

Add proper error message handling when an API user attempts a Bulk SMS send where the variable content exceeds the allowed SMS message limit when combined with their template's content.

Related Issues | Cartes liées

cds-snc/notification-utils#290

Test instructions | Instructions pour tester la modification

  1. Send a bulk SMS request via the API
  2. Note that an error message indicating the message length is too long, possibly due to custom content.
  3. Note that the error message is accompanied by the affected row number.

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@jzbahrai
Copy link
Collaborator

tested!

{
	"status_code": 400,
	"errors": [
		{
			"error": "BadRequestError",
			"message": "Content for template has a character count greater than the limit of 612. Notification to +1xxx on row #2 exceeds the maximum size limit."
		}
	]
}

@whabanks whabanks merged commit 6b24be4 into main Apr 24, 2024
4 checks passed
@whabanks whabanks deleted the fix/sms-content-length-error branch April 24, 2024 19:25
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