[v10.1.x] Alerting: Fix deleting rules in a folder with matching UID in another organization (#79007)

* Alerting: Fix deleting rules in a folder with matching UID in another organization (#78258)

* Remove usage of obsolete function for deleting alert rules under folder

* Apply suggestion from code review

* Update tests

(cherry picked from commit 6d4625ad52)

* fixup
This commit is contained in:
Sofia Papagiannaki
2023-12-05 13:30:17 +02:00
committed by GitHub
parent 7a0ee7044b
commit 5bed94f873
11 changed files with 80 additions and 94 deletions
+1 -2
View File
@@ -18,8 +18,7 @@ func ToFolderErrorResponse(err error) response.Response {
if errors.Is(err, dashboards.ErrFolderTitleEmpty) ||
errors.Is(err, dashboards.ErrDashboardTypeMismatch) ||
errors.Is(err, dashboards.ErrDashboardInvalidUid) ||
errors.Is(err, dashboards.ErrDashboardUidTooLong) ||
errors.Is(err, dashboards.ErrFolderContainsAlertRules) {
errors.Is(err, dashboards.ErrDashboardUidTooLong) {
return response.Error(400, err.Error(), nil)
}