Skip to content

Alertmanager: Check error code fron pre-notify hooks, and ignore 204. #11985

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

Merged
merged 1 commit into from
Jul 5, 2025

Conversation

stevesg
Copy link
Contributor

@stevesg stevesg commented Jul 4, 2025

We weren't correctly checking the error code, which was seemingly fine unless the
hook returned valid JSON, in which case this was parsed as a valid payload.

Additionally, allow the hook to return 204 (No Content) to indicate it did not
perform any processing, and do not log errors in this case.

We we're correctly checking the error code, which was seemingly fine unless the
hook returned valid JSON, in which case this was parsed as a valid payload.

Additionally, allow the hook to return 204 (No Content) to indicate it did not
perform any processing, and do not log errors in this case.
@stevesg stevesg requested review from a team as code owners July 4, 2025 22:47
@stevesg stevesg added the changelog-not-needed PRs that don't need a CHANGELOG.md entry label Jul 4, 2025
@fayzal-g fayzal-g merged commit d2a17f2 into main Jul 5, 2025
32 of 33 checks passed
@fayzal-g fayzal-g deleted the stevesg/notify-hooks-ignore-empty-responses branch July 5, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-not-needed PRs that don't need a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants