Skip to content

Commit 7c24ca0

Browse files
author
Prabhu Ram
committed
MC-37250: [GraphQl] Change exception message when wishlist is not enabled
- updated exception messages
1 parent f842f8d commit 7c24ca0

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function resolve(
9797
$wishlist = $this->getWishlist($wishlistId, $customerId);
9898

9999
if (null === $wishlist->getId() || $customerId !== (int) $wishlist->getCustomerId()) {
100-
throw new GraphQlInputException(__('The wishlist was not found.'));
100+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled.'));
101101
}
102102

103103
$wishlistItems = $this->getWishlistItems($args['wishlistItems']);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function resolve(
5454
array $args = null
5555
) {
5656
if (!$this->wishlistConfig->isEnabled()) {
57-
throw new GraphQlInputException(__('The wishlist is not currently available.'));
57+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled.'));
5858
}
5959

6060
if (false === $context->getExtensionAttributes()->getIsCustomer()) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function resolve(
8383
array $args = null
8484
) {
8585
if (!$this->wishlistConfig->isEnabled()) {
86-
throw new GraphQlInputException(__('The wishlist is not currently available.'));
86+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled.'));
8787
}
8888

8989
$customerId = $context->getUserId();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function resolve(
8383
array $args = null
8484
) {
8585
if (!$this->wishlistConfig->isEnabled()) {
86-
throw new GraphQlInputException(__('The wishlist is not currently available.'));
86+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled.'));
8787
}
8888

8989
$customerId = $context->getUserId();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function resolve(
6363
array $args = null
6464
) {
6565
if (!$this->wishlistConfig->isEnabled()) {
66-
throw new GraphQlInputException(__('The wishlist is not currently available.'));
66+
throw new GraphQlInputException(__('The wishlist configuration is currently disabled.'));
6767
}
6868

6969
$customerId = $context->getUserId();

dev/tests/api-functional/testsuite/Magento/GraphQl/Wishlist/AddDownloadableProductToWishlistTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testAddDownloadableProductOnDisabledWishlist(): void
110110
json_encode($itemOptions)
111111
), '{}');
112112
$query = $this->getQuery($qty, $sku, $productOptionsQuery);
113-
$this->expectExceptionMessage('The wishlist is not currently available.');
113+
$this->expectExceptionMessage('The wishlist configuration is currently disabled.');
114114
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
115115
}
116116

dev/tests/api-functional/testsuite/Magento/GraphQl/Wishlist/CustomerWishlistTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function testAddProductToWishlistWithDisabledProduct()
275275
public function testCustomerCannotGetWishlistWhenDisabled()
276276
{
277277
$this->expectException(\Exception::class);
278-
$this->expectExceptionMessage('The wishlist is not currently available.');
278+
$this->expectExceptionMessage('The wishlist configuration is currently disabled.');
279279

280280
$query =
281281
<<<QUERY

0 commit comments

Comments
 (0)