Log detailed sms delivery status for mmg from process_sms_client_response task.

Also log detailed delivery status for firetext in the same place in addition
to it being logged from notifications_dao.

Logging detailed delivery statuses will help us see why messages
fail to deliver. In the future we could persist detailed delivery
status in the database.
This commit is contained in:
Pea Tyczynska
2020-05-27 18:03:55 +01:00
parent 5462087f21
commit a4b942cf6c
8 changed files with 98 additions and 36 deletions

View File

@@ -36,9 +36,10 @@ def process_sms_client_response(self, status, provider_reference, client_name, c
# validate status
try:
notification_status = response_parser(status)
notification_status, detailed_status = response_parser(status, code)
current_app.logger.info(
f'{client_name} callback returned status of {status} for reference: {provider_reference}'
f'{client_name} callback returned '
f'status of {notification_status}: {detailed_status} for reference: {provider_reference}'
)
except KeyError:
_process_for_status(