Skip to content

Commit dc3fc81

Browse files
Merge remote-tracking branch '37871/log-aggregation-1' into comm_jul
2 parents 50d7f2e + 8d8772b commit dc3fc81

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Checkout\Api\PaymentProcessingRateLimiterInterface;
1212
use Magento\Checkout\Api\PaymentSavingRateLimiterInterface;
1313
use Magento\Framework\App\ObjectManager;
14+
use Magento\Framework\Exception\LocalizedException;
1415
use Magento\Quote\Api\CartRepositoryInterface;
1516
use Magento\Framework\Exception\CouldNotSaveException;
1617
use Magento\Quote\Model\Quote;
@@ -139,9 +140,14 @@ public function savePaymentInformationAndPlaceOrder(
139140
}
140141
try {
141142
$orderId = $this->cartManagement->placeOrder($cartId);
142-
} catch (\Magento\Framework\Exception\LocalizedException $e) {
143+
} catch (LocalizedException $e) {
143144
$this->logger->critical(
144-
'Placing an order with quote_id ' . $cartId . ' is failed: ' . $e->getMessage()
145+
'Placing an Order failed (reason: '. $e->getMessage() .')',
146+
[
147+
'quote_id' => $cartId,
148+
'exception' => (string)$e,
149+
'is_guest_checkout' => true
150+
]
145151
);
146152
throw new CouldNotSaveException(
147153
__($e->getMessage()),

app/code/Magento/Checkout/Model/PaymentInformationManagement.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ public function savePaymentInformationAndPlaceOrder(
152152
$orderId = $this->cartManagement->placeOrder($cartId);
153153
} catch (LocalizedException $e) {
154154
$this->logger->critical(
155-
'Placing an order with quote_id ' . $cartId . ' is failed: ' . $e->getMessage()
155+
'Placing an Order failed (reason: '. $e->getMessage() .')',
156+
[
157+
'quote_id' => $cartId,
158+
'exception' => (string)$e,
159+
'is_guest_checkout' => false
160+
]
156161
);
157162
throw new CouldNotSaveException(
158163
__($e->getMessage()),

0 commit comments

Comments
 (0)