Problems with AvatarEditorService:SearchCatalog()

Problem 1

AvatarEditorService:SearchCatalog() returns results of the incorrect asset types in the following case (when searching for classic clothing):

local CSP = CatalogSearchParams.new()
CSP.AssetTypes = {Enum.AvatarAssetType.Shirt,Enum.AvatarAssetType.Pants,Enum.AvatarAssetType.TShirt}

for i,v in pairs(game:GetService('AvatarEditorService'):SearchCatalog(CSP):GetCurrentPage()) do
    print(v.AssetType or v.BundleType)
end

Note: When specifying a SearchKeyword, the results are normal. This only seems to happen when no SearchKeyword is provided into CatalogSearchParams.

Expected behavior

The results being returned should be of AssetType Shirt, Pants or TShirt (classic clothing)

Actual behaviour

The results being returned are of mixed asset and bundle types

*Apologies, I think that this should’ve been marked as an Engine bug rather than a Studio bug. It is not letting me re-categorize for some reason


Problem 2

HTTP 400 (Bad Request) when searching for all Bundle Types

local CSP = CatalogSearchParams.new()
CSP.AssetTypes = {Enum.AvatarAssetType.HairAccessory}
CSP.BundleTypes = Enum.BundleType:GetEnumItems()

local Pages = game:GetService('AvatarEditorService'):SearchCatalog(CSP) // Error: HTTP 400 (Bad Request)
4 Likes

The above problem should be fixed now. Let us know if you still find some concerns.

2 Likes

Many thanks! The Classic Clothing search now works correctly. However problem #2 mentioned in the original message still seems to be occurring:


HTTP 400 (Bad Request) when searching for all Bundle Types

local CSP = CatalogSearchParams.new()
CSP.AssetTypes = {Enum.AvatarAssetType.HairAccessory}
CSP.BundleTypes = Enum.BundleType:GetEnumItems()

local Pages = game:GetService('AvatarEditorService'):SearchCatalog(CSP) // Error: HTTP 400 (Bad Request)

BundleTypeId = 5 does not exist. We will update the documentation regarding that and also remove the BundleTypeId =5 (DynamicHeadAvatar) from the enum types. Meanwhile, you can remove BundleTypeId =5 and use the endpoint.

Thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.