Skip to content

Commit 63a7e35

Browse files
committed
PWA-1299: [Graphql] Unable to update the items of a bundle-product in a wishlist
* Reverted GraphQL exception type
1 parent b28711d commit 63a7e35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/WishlistGraphQl/Model/Resolver/UpdateProductsInWishlist.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\Framework\GraphQl\Config\Element\Field;
1111
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
12+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1213
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
1314
use Magento\Framework\GraphQl\Query\ResolverInterface;
1415
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
@@ -83,7 +84,7 @@ public function resolve(
8384
array $args = null
8485
) {
8586
if (!$this->wishlistConfig->isEnabled()) {
86-
throw new GraphQlAuthorizationException(__('The wishlist configuration is currently disabled'));
87+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled'));
8788
}
8889

8990
$customerId = $context->getUserId();
@@ -95,7 +96,7 @@ public function resolve(
9596
$wishlist = $this->getWishlist((int) $args['wishlistId'], $customerId);
9697

9798
if (null === $wishlist->getId() || $customerId !== (int) $wishlist->getCustomerId()) {
98-
throw new GraphQlNoSuchEntityException(__('Could not find the specified wishlist'));
99+
throw new GraphQlInputException(__('Could not find the specified wishlist'));
99100
}
100101

101102
$wishlistItems = $this->getWishlistItems($args['wishlistItems'], $wishlist);

0 commit comments

Comments
 (0)