fix: improve api error handling for dashboards and folders (#111831)

This commit is contained in:
Mustafa Sencer Özcan
2025-10-01 09:54:14 +02:00
committed by GitHub
parent b7bdc98479
commit aeb62b7acc
9 changed files with 214 additions and 28 deletions
+1 -1
View File
@@ -417,7 +417,7 @@ func (ss *FolderStoreImpl) GetHeight(ctx context.Context, foldrUID string, orgID
ele := queue[0]
queue = queue[1:]
if parentUID != nil && *parentUID == ele {
return 0, folder.ErrCircularReference
return 0, folder.ErrCircularReference.Errorf("circular reference detected")
}
folders, err := ss.GetChildren(ctx, folder.GetChildrenQuery{UID: ele, OrgID: orgID})
if err != nil {