mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Fix the error message for message-too=long
There was a bug that displayed the error message with 2 red error boxes around the error message. Also need another else to handle a new error message from the API, the old one can be removed after the API is deployed. But this can go first. I tested this branch with API master and the API branch with the change. I tested one off SMS and a CSV upload.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user