diff --git a/packages/api/src/platforms/vtex/resolvers/collection.ts b/packages/api/src/platforms/vtex/resolvers/collection.ts index 90627ba180..537156038d 100644 --- a/packages/api/src/platforms/vtex/resolvers/collection.ts +++ b/packages/api/src/platforms/vtex/resolvers/collection.ts @@ -76,23 +76,17 @@ export const StoreCollection: Record> = { segments.slice(0, index + 1).join('/') ) - try { - const collections = await Promise.all( - slugs.map((s) => collectionLoader.load(s)) - ) - - return { - itemListElement: collections.map((collection, index) => ({ - item: new URL(`https://${collection.url}`).pathname.toLowerCase(), - name: collection.name, - position: index + 1, - })), - numberOfItems: collections.length, - } - } catch (err) { - console.error({ slug, root, segments, slugs }) + const collections = await Promise.all( + slugs.map((s) => collectionLoader.load(s)) + ) - throw err + return { + itemListElement: collections.map((collection, index) => ({ + item: new URL(`https://${collection.url}`).pathname.toLowerCase(), + name: collection.name, + position: index + 1, + })), + numberOfItems: collections.length, } }, }