refactor(catalog): wrap orphan-batch iteration error

This commit is contained in:
Quick
2026-05-28 17:02:53 -04:00
parent c1f12d1b1b
commit 0d651cc947
+4 -1
View File
@@ -633,7 +633,10 @@ func (r *FolderRepository) collectOrphanBatch(ctx context.Context, folderID, lim
}
ids = append(ids, contentID)
}
return ids, rows.Err()
if err := rows.Err(); err != nil {
return nil, fmt.Errorf("iterating orphan rows: %w", err)
}
return ids, nil
}
// dirSetToSlice returns the keys of set as a slice (nil if empty).