Skip to content

Commit 01f3598

Browse files
committed
ACP2E-3892: [Mainline] Unpopulated pages are cached due to search engine errors
1 parent 5327ca8 commit 01f3598

File tree

2 files changed

+5
-1
lines changed
  • app/code/Magento

2 files changed

+5
-1
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1818
use Magento\Framework\GraphQl\Query\Resolver\ArgumentsProcessorInterface;
1919
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
20+
use Magento\Framework\Search\Request\EmptyRequestDataException;
2021
use Magento\GraphQl\Model\Query\ContextInterface;
2122
use Magento\Search\Api\SearchInterface;
2223

@@ -154,7 +155,9 @@ public function getResult(
154155
'suggestions' => $suggestions,
155156
]
156157
);
157-
} catch (ClientException) {
158+
} catch (GraphQlInputException $e) {
159+
throw $e;
160+
} catch (\InvalidArgumentException|EmptyRequestDataException|ClientException) {
158161
return $this->searchResultFactory->create(
159162
[
160163
'totalCount' => 0,

app/code/Magento/OpenSearch/SearchAdapter/Adapter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
/**
2626
* OpenSearch Search Adapter
27+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2728
*/
2829
class Adapter implements AdapterInterface
2930
{

0 commit comments

Comments
 (0)