Alerting: Fix panic when creating a new Alertmanager returns an error (#79641)

Alerting: Fix panic after error creating new Alertmanager
This commit is contained in:
Santiago
2023-12-18 15:33:07 +01:00
committed by GitHub
parent 864d91ed3e
commit f7248efff5

View File

@@ -269,6 +269,7 @@ func (moa *MultiOrgAlertmanager) SyncAlertmanagersForOrgs(ctx context.Context, o
am, err := moa.factory(ctx, orgID)
if err != nil {
moa.logger.Error("Unable to create Alertmanager for org", "org", orgID, "error", err)
continue
}
moa.alertmanagers[orgID] = am
alertmanager = am