Skip to content

Commit 77fee57

Browse files
committed
MC-26683: Removed get errors of cart allowing to add product to cart
1 parent 2d46d98 commit 77fee57

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,6 @@ public function execute(Quote $cart, array $cartItems): void
5454
$this->addProductToCart->execute($cart, $cartItemData);
5555
}
5656

57-
if ($cart->getData('has_error')) {
58-
$e = new GraphQlInputException(__('Shopping cart errors'));
59-
$errors = $cart->getErrors();
60-
foreach ($errors as $error) {
61-
/** @var MessageInterface $error */
62-
$e->addError(new GraphQlInputException(__($error->getText())));
63-
}
64-
throw $e;
65-
}
66-
6757
$this->cartRepository->save($cart);
6858
}
6959
}

0 commit comments

Comments
 (0)