Skip to content

Fix wrong classification of sending alert error#723

Merged
vincent-olivert-riera merged 1 commit intoline:masterfrom
hoangpn:bugfix/wrong_error_type_of_alert_notification
Apr 6, 2026
Merged

Fix wrong classification of sending alert error#723
vincent-olivert-riera merged 1 commit intoline:masterfrom
hoangpn:bugfix/wrong_error_type_of_alert_notification

Conversation

@hoangpn
Copy link
Copy Markdown
Contributor

@hoangpn hoangpn commented Apr 6, 2026

At commit 359ca53, we added the categorize_error() function to classify the error_type of sending alert notification based on the HTTP code for the purpose of labeling metrics. However, there was a mistake causing error_type to always be "other_error". The reason is that the HTTP Requests library (requests) always returns False when executing the bool (response) statement in case of a response failure. (Ref: psf/requests#2002)

We have fixed this issue and added the necessary tests for verification.

At commit 359ca53, we added the categorize_error() function to classify the error_type of
sending alert notification based on the HTTP code for the purpose of labeling metrics.
However, there was a mistake causing error_type to always be "other_error". The reason is
that the HTTP Requests library (requests) always returns False when executing the `bool
(response)` statement in case of a response failure.
(Ref: psf/requests#2002)

We have fixed this issue and added the necessary tests for verification.
Copy link
Copy Markdown
Contributor

@vincent-olivert-riera vincent-olivert-riera left a comment

Choose a reason for hiding this comment

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

LGTM

@vincent-olivert-riera vincent-olivert-riera merged commit 432d5b9 into line:master Apr 6, 2026
5 checks passed
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.

2 participants