From efe4cd589c91cbe0d7534972932dec0fe2386ebb Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 11 Jan 2024 13:22:13 -0800 Subject: [PATCH] more debugging messages --- app/clients/sms/aws_sns.py | 2 ++ app/delivery/send_to_providers.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/clients/sms/aws_sns.py b/app/clients/sms/aws_sns.py index d75122a7e..e1c872665 100644 --- a/app/clients/sms/aws_sns.py +++ b/app/clients/sms/aws_sns.py @@ -81,8 +81,10 @@ class AwsSnsClient(SmsClient): PhoneNumber=to, Message=content, MessageAttributes=attributes ) except botocore.exceptions.ClientError as e: + self.current_app.logger.error(e) raise str(e) except Exception as e: + self.current_app.logger(e) raise str(e) finally: elapsed_time = monotonic() - start_time diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index ac844f540..6db858eed 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -99,8 +99,11 @@ def send_sms_to_provider(notification): "international": notification.international, } db.session.close() # no commit needed as no changes to objects have been made above + current_app.logger.info("sending to sms") message_id = provider.send_sms(**send_sms_kwargs) + current_app.logger.info(f"got message_id {message_id}") except Exception as e: + current_app.logger.error(e) notification.billable_units = template.fragment_count dao_update_notification(notification) raise e