Merge pull request #3362 from alphagov/fix-message-too-long-error

Fix the error message for message-too-long
This commit is contained in:
Rebecca Law
2020-03-10 13:07:13 +00:00
committed by GitHub
3 changed files with 11 additions and 14 deletions

View File

@@ -907,8 +907,11 @@ def get_template_error_dict(exception):
error = 'not-allowed-to-send-to'
elif 'Exceeded send limits' in exception.message:
error = 'too-many-messages'
# the error from the api is changing for message-too-long, but we need both until the api is deployed.
elif 'Content for template has a character count greater than the limit of' in exception.message:
error = 'message-too-long'
elif 'Text messages cannot be longer than' in exception.message:
error = 'message-too-long'
else:
raise exception