diff --git a/app/main/views/send.py b/app/main/views/send.py index 557faf0ba..07b837101 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -668,11 +668,11 @@ def _check_notification(service_id, template_id, exception=None): def get_template_error_dict(exception): # TODO: Make API return some computer-friendly identifier as well as the end user error messages - if 'service is in trial mode' in exception.message: + if 'service is in trial mode' in exception._message: error = 'not-allowed-to-send-to' - elif 'Exceeded send limits' in exception.message: + elif 'Exceeded send limits' in exception._message: error = 'too-many-messages' - elif 'Content for template has a character count greater than the limit of' in exception.message: + elif 'Content for template has a character count greater than the limit of' in exception._message: error = 'message-too-long' else: raise exception