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) {