Skip to content

Commit

Permalink
#2956 Exception type change
Browse files Browse the repository at this point in the history
  • Loading branch information
riha112 committed Jul 23, 2021
1 parent 4316abc commit 91900e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Model/Resolver/MoveWishlistToCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Magento\Framework\DataObject;
use Magento\Framework\GraphQl\Config\Element\Field;
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
use Magento\Framework\GraphQl\Query\ResolverInterface;
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
Expand Down Expand Up @@ -128,7 +129,7 @@ protected function addItemsToCart(array $wishlistItems, CartInterface $quote): v
}

if (count($errors) > 0) {
throw new \Exception(json_encode($errors));
throw new GraphQlInputException(__(json_encode($errors)));
}

try {
Expand Down

0 comments on commit 91900e7

Please sign in to comment.