[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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user