optimize retrieve logic

This commit is contained in:
team 1
2026-04-14 13:04:41 +02:00
parent 7caf6b5354
commit bf0b58fdea

View File

@@ -34,9 +34,11 @@ final readonly class ShopSearchService
if (!$this->enabled) {
return [];
}
$response = [];
$query = $this->queryParser->parse($originalPrompt, $commerceIntent);
$criteria = $this->criteriaBuilder->build($query, $this->maxResults);
try {
$response = $this->storeApiClient->searchProducts($criteria);
} catch (ClientExceptionInterface|DecodingExceptionInterface|RedirectionExceptionInterface|ServerExceptionInterface|TransportExceptionInterface $e) {