Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit a7f0871

Browse files
author
Roman Glushko
committed
#32 Changed exception to throw
1 parent e17c536 commit a7f0871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/CmsGraphQl/Model/Resolver/CmsBlocks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Framework\Exception\NoSuchEntityException;
1212
use Magento\Framework\GraphQl\Config\Element\Field;
1313
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
14+
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
1415
use Magento\Framework\GraphQl\Query\Resolver\Value;
1516
use Magento\Framework\GraphQl\Query\Resolver\ValueFactory;
1617
use Magento\Framework\GraphQl\Query\ResolverInterface;
@@ -63,7 +64,7 @@ public function resolve(
6364
$cmsBlockIdentifier
6465
);
6566
} catch (NoSuchEntityException $ex) {
66-
$cmsBlockListData[$cmsBlockIdentifier] = new GraphQlInputException(
67+
$cmsBlockListData[$cmsBlockIdentifier] = new GraphQlNoSuchEntityException(
6768
__(
6869
'CMS block with "%1" ID does not found',
6970
$cmsBlockIdentifier

0 commit comments

Comments
 (0)