Folders: Add max depth check with descendant to /apis (#115305)

This commit is contained in:
Stephanie Hingtgen
2025-12-19 20:17:39 +00:00
committed by GitHub
parent 4164239f56
commit 2fbe2f77e3
8 changed files with 275 additions and 51 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ func ToFolderErrorResponse(err error) response.Response {
errors.Is(err, dashboards.ErrDashboardTypeMismatch) ||
errors.Is(err, dashboards.ErrDashboardInvalidUid) ||
errors.Is(err, dashboards.ErrDashboardUidTooLong) ||
errors.Is(err, folder.ErrFolderCannotBeParentOfItself) {
errors.Is(err, folder.ErrFolderCannotBeParentOfItself) ||
errors.Is(err, folder.ErrMaximumDepthReached) {
return response.Error(http.StatusBadRequest, err.Error(), nil)
}