Skip to content

Commit 04add01

Browse files
SarmisthaSarmistha
authored andcommitted
Merge remote-tracking branch 'magento-l3/ACP2E-2357' into 2.4-develop
2 parents f6d4542 + ad8042f commit 04add01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/PlaceOrder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
namespace Magento\QuoteGraphQl\Model\Resolver;
99

10+
use Magento\Framework\Exception\AuthorizationException;
1011
use Magento\Framework\Exception\LocalizedException;
1112
use Magento\Framework\GraphQl\Config\Element\Field;
13+
use Magento\Framework\GraphQl\Exception\GraphQlAuthorizationException;
1214
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1315
use Magento\Framework\GraphQl\Query\ResolverInterface;
1416
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
@@ -78,6 +80,10 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
7880
$cart = $this->getCartForCheckout->execute($maskedCartId, $userId, $storeId);
7981
$orderId = $this->placeOrder->execute($cart, $maskedCartId, $userId);
8082
$order = $this->orderRepository->get($orderId);
83+
} catch (AuthorizationException $exception) {
84+
throw new GraphQlAuthorizationException(
85+
__($exception->getMessage())
86+
);
8187
} catch (LocalizedException $e) {
8288
throw $this->errorMessageFormatter->getFormatted(
8389
$e,

0 commit comments

Comments
 (0)