Alerting: Fix response is not returned for invalid Duration in Provisioning API (#58046)
This commit is contained in:
@@ -257,7 +257,7 @@ func (srv *ProvisioningSrv) RoutePostAlertRule(c *models.ReqContext, ar definiti
|
||||
upstreamModel, err := ar.UpstreamModel()
|
||||
upstreamModel.OrgID = c.OrgID
|
||||
if err != nil {
|
||||
ErrResp(http.StatusBadRequest, err, "")
|
||||
return ErrResp(http.StatusBadRequest, err, "")
|
||||
}
|
||||
createdAlertRule, err := srv.alertRules.CreateAlertRule(c.Req.Context(), upstreamModel, alerting_models.ProvenanceAPI, c.UserID)
|
||||
if errors.Is(err, alerting_models.ErrAlertRuleFailedValidation) {
|
||||
|
||||
Reference in New Issue
Block a user