From 2a80780660f0e97299904ffd8f2888ae777505ae Mon Sep 17 00:00:00 2001 From: Stephen Astels Date: Tue, 14 May 2024 15:40:24 -0400 Subject: [PATCH] again --- app/clients/sms/aws_sns.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/clients/sms/aws_sns.py b/app/clients/sms/aws_sns.py index 2ada444b67..f0d35c9663 100644 --- a/app/clients/sms/aws_sns.py +++ b/app/clients/sms/aws_sns.py @@ -2,7 +2,6 @@ from time import monotonic import boto3 -import botocore import phonenumbers from notifications_utils.statsd_decorators import statsd @@ -66,12 +65,9 @@ def send_sms(self, to, content, reference, multi=True, sender=None, template_id= try: start_time = monotonic() response = client.publish(PhoneNumber=to, Message=content, MessageAttributes=attributes) - except botocore.exceptions.ClientError as e: - self.statsd_client.incr("clients.sns.error") - raise str(e) except Exception as e: self.statsd_client.incr("clients.sns.error") - raise str(e) + raise Exception(e) finally: elapsed_time = monotonic() - start_time self.current_app.logger.info("AWS SNS request finished in {}".format(elapsed_time))