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

fix log formatting #1289

Merged
merged 1 commit into from
Aug 22, 2024
Merged

fix log formatting #1289

merged 1 commit into from
Aug 22, 2024

Conversation

terrazoon
Copy link
Contributor

@terrazoon terrazoon commented Aug 21, 2024

Description

We do some log formatting to prettify the logs, which is great, but the formatting fails if the log message is a nested dictionary, which it is when we get delivery receipts from AWS. Which means we are getting a stack trace every time a message is delivered or permanently fails. This serves no purpose, and doesn't affect logging at all (ie, we still get the delivered/failed message, just with extra unwanted stack traces).

Suppress the stack trace if it is caused by a KeyError.

Security Considerations

N/A

@terrazoon terrazoon self-assigned this Aug 21, 2024
@terrazoon terrazoon linked an issue Aug 21, 2024 that may be closed by this pull request
Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @terrazoon!

Copy link
Contributor

@heyitsmebev heyitsmebev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heyitsmebev heyitsmebev merged commit 9b70fb9 into main Aug 22, 2024
7 checks passed
@heyitsmebev heyitsmebev deleted the notify-api-1215 branch August 22, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: KeyError: "'notification'" in the logs
3 participants