Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: KeyError: "'notification'" in the logs #1215

Closed
heyitsmebev opened this issue Jul 25, 2024 · 0 comments · Fixed by #1289
Closed

Bug: KeyError: "'notification'" in the logs #1215

heyitsmebev opened this issue Jul 25, 2024 · 0 comments · Fixed by #1289
Assignees

Comments

@heyitsmebev
Copy link
Contributor

Who discovered this?

Bev

What happened?

I was on the staging app and I notice this KeyError: "'notification'" in the logs. Doesn't seem "normal". It looks like an error in the log itself

11:07:43.515: [APP/PROC/WORKER.0] [2024-07-25 18:07:43,514: INFO/ForkPoolWorker-7] START TIME 2024-07-25 18:07:12.896489 END TIME 2024-07-25 18:07:43.514677
11:07:44.193: [APP/PROC/WORKER.0] [2024-07-25 18:07:44,192: ERROR/ForkPoolWorker-7] failed to format log message: "'notification'" not found
11:07:44.193: [APP/PROC/WORKER.0] Traceback (most recent call last):
11:07:44.193: [APP/PROC/WORKER.0]   File "/home/vcap/app/notifications_utils/logging.py", line 162, in process_log_record
11:07:44.193: [APP/PROC/WORKER.0]     log_record["message"] = log_record["message"].format(**log_record)
11:07:44.193: [APP/PROC/WORKER.0]                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11:07:44.193: [APP/PROC/WORKER.0] KeyError: "'notification'"
11:07:44.193: [APP/PROC/WORKER.0] [2024-07-25 18:07:44,191: INFO/ForkPoolWorker-7] DELIVERED: {'notification': {'messageId': '41b5e462-9a98-5326-8ec0-bb7e0c09008c', 'timestamp': '2024-07-25 18:07:13.49'}, 'delivery': {'numberOfMessageParts': 1, 'destination': '1XXXXXXXXXX', 'priceInUSD': 0.00881, 'smsType': 'Transactional', 'providerResponse': 'Message has been accepted by phone', 'dwellTimeMs': 21, 'dwellTimeMsUntilDeviceAck': 1704}, 'status': 'SUCCESS'} for message_id 41b5e462-9a98-5326-8ec0-bb7e0c09008c

Environment

staging

What pages did this appear on?

In notify-api-staging logs

Detail the steps for someone to reproduce

Go through the send flow, send message

What browsers are you seeing the problem on?

No response

Relevant log output

11:07:43.515: [APP/PROC/WORKER.0] [2024-07-25 18:07:43,514: INFO/ForkPoolWorker-7] START TIME 2024-07-25 18:07:12.896489 END TIME 2024-07-25 18:07:43.514677
11:07:44.193: [APP/PROC/WORKER.0] [2024-07-25 18:07:44,192: ERROR/ForkPoolWorker-7] failed to format log message: "'notification'" not found
11:07:44.193: [APP/PROC/WORKER.0] Traceback (most recent call last):
11:07:44.193: [APP/PROC/WORKER.0]   File "/home/vcap/app/notifications_utils/logging.py", line 162, in process_log_record
11:07:44.193: [APP/PROC/WORKER.0]     log_record["message"] = log_record["message"].format(**log_record)
11:07:44.193: [APP/PROC/WORKER.0]                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11:07:44.193: [APP/PROC/WORKER.0] KeyError: "'notification'"
11:07:44.193: [APP/PROC/WORKER.0] [2024-07-25 18:07:44,191: INFO/ForkPoolWorker-7] DELIVERED: {'notification': {'messageId': '41b5e462-9a98-5326-8ec0-bb7e0c09008c', 'timestamp': '2024-07-25 18:07:13.49'}, 'delivery': {'numberOfMessageParts': 1, 'destination': '1XXXXXXXXXX', 'priceInUSD': 0.00881, 'smsType': 'Transactional', 'providerResponse': 'Message has been accepted by phone', 'dwellTimeMs': 21, 'dwellTimeMsUntilDeviceAck': 1704}, 'status': 'SUCCESS'} for message_id 41b5e462-9a98-5326-8ec0-bb7e0c09008c
@heyitsmebev heyitsmebev transferred this issue from GSA/notifications-admin Jul 25, 2024
@terrazoon terrazoon moved this from 🌱 New to 🏗 In progress (WIP: ≤ 3 per person) in Notify.gov product board Aug 21, 2024
@terrazoon terrazoon self-assigned this Aug 21, 2024
@terrazoon terrazoon linked a pull request Aug 21, 2024 that will close this issue
@terrazoon terrazoon moved this from 🏗 In progress (WIP: ≤ 3 per person) to 👀 In review in Notify.gov product board Aug 22, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Notify.gov product board Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants