magento2: GraphQL cart handling of "The requested qty is not available"

Preconditions (*)

  1. Magento 2.4.1., but I don’t see anything in the changelog for 2.4.2 regarding this issue

Steps to reproduce (*)

  1. Add a product to the cart via graphql with a quantity > 1
  2. Set the available stock of the product to something lower than the added quantity in step 1
  3. Load the cart via the cart graphql query
  4. The error “The requested qty is not available” is returned as part of the response, but the cart item quantity is not reduced

The same applies when you set the product to “out of stock” in step 2, then you get the error message “some of the products are out of stock”, but the cart item is not removed

Expected result (*)

I think the optimal case would be, that the cartItem’s quantity should be set to the max of the available stock. Furthermore, the error message/object should contain more information on the cartItem in question, so that a appropriate message can be shown to the user.

Actual result (*)

The cartItems quantity is not set to the max of the available stock and there is no indication which cartItem is causing this error. The user can not complete the purchase. Only if one deletes all cart items and readds them, this is possible.

Bildschirmfoto 2021-06-18 um 11 55 18

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Hi @niklaswolf , We are closing this issue as there has been no latest update on the same. Thank you.

@engcom-November why should I reproduce this in the Magento Frontend, when the issue topic is clearly about GraphQl-API? Why do you close the issue, even if someone from Magento Engineering confirmed the issue beforehand and apparently forgot to flag the issue as confirmed, which I even pointed out afterwards?

@engcom-November please take this up on high priority. This is serious bug. I am using this hotfix.