ACP2E-5122: Handled GraphQL cart errors are incorrectly written to the exception log
The ACP2E-5122 patch fixes the issue where handled GraphQL cart request errors are written to the exception log as application errors. This patch is available when the Quality Patches Tool (QPT) 1.1.84 is installed. The patch ID is ACP2E-5122. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.10.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.8-p5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.9
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Handled GraphQL cart request errors are written to the exception log as application errors.
Steps to reproduce:
-
Send a GraphQL
placeOrdermutation with an invalid, expired, or already-destroyed masked cart ID, such as this mutation:code language-none mutation { placeOrder(input: { cart_id: "test" }) { orderV2 { id number } } } -
Check the GraphQL response.
-
Check
var/log/exception.logfor the cart error.
Expected results:
- The GraphQL request returns a handled client-facing error payload for the invalid cart without an HTTP 500 response.
- The handled GraphQlNoSuchEntityException is not written to
var/log/exception.logand is routed to a lower-severity log channel instead.
Actual results:
Each request writes the handled exception to var/log/exception.log at report.ERROR severity, which causes unbounded log growth during repeated requests.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide