Alerting: Provisioning API returns 403 on quota exceeded for rule group PUT (#106409)

This commit is contained in:
Vadim Stepanov
2025-06-09 11:12:22 +01:00
committed by GitHub
parent 5a13fccd62
commit 1df888c517
2 changed files with 17 additions and 0 deletions
@@ -499,6 +499,9 @@ func (srv *ProvisioningSrv) RoutePutAlertRuleGroup(c *contextmodel.ReqContext, a
if errors.Is(err, store.ErrOptimisticLock) {
return ErrResp(http.StatusConflict, err, "")
}
if errors.Is(err, alerting_models.ErrQuotaReached) {
return ErrResp(http.StatusForbidden, err, "")
}
if err != nil {
return response.ErrOrFallback(http.StatusInternalServerError, "", err)
}