Alerting: Retry readiness check to the remote Alertmanager on 5xx status code responses (#81174)

This commit is contained in:
Santiago
2024-01-24 21:39:06 +01:00
committed by GitHub
parent c9ff6a9ab9
commit fbbda6c05e

View File

@@ -107,7 +107,7 @@ func (am *Alertmanager) IsReadyWithBackoff(ctx context.Context) (bool, error) {
}
if status != http.StatusOK {
if status/400 == 1 {
if status >= 400 && status < 500 {
am.logger.Debug("Ready check failed with non-retriable status code", "attempt", attempts, "status", status)
return false, fmt.Errorf("ready check failed with non-retriable status code %d", status)
}