Skip to content

Commit

Permalink
nope
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels committed May 14, 2024
1 parent 635883b commit fb8f395
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/clients/sms/aws_sns.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ 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 Exception(e)
raise str(e)
finally:
elapsed_time = monotonic() - start_time
self.current_app.logger.info("AWS SNS request finished in {}".format(elapsed_time))
Expand Down

0 comments on commit fb8f395

Please sign in to comment.