From bf0b58fdea45584b40dbb4b031a37155fa75a06a Mon Sep 17 00:00:00 2001 From: team 1 Date: Tue, 14 Apr 2026 13:04:41 +0200 Subject: [PATCH] optimize retrieve logic --- src/Commerce/ShopSearchService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Commerce/ShopSearchService.php b/src/Commerce/ShopSearchService.php index 7612ce5..04d9fc7 100644 --- a/src/Commerce/ShopSearchService.php +++ b/src/Commerce/ShopSearchService.php @@ -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) {