Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

"The requested qty is not available" should be received instead of Internal server error #350

@TomashKhamlai

Description

@TomashKhamlai

Preconditions (*)

  1. Add configurable product to Cart #224 or Add virtual products to cart #320 is merged or [Cart Operations] Add configurable product to Cart #142 is fixed
  2. Default mode or
php bin/magento deploy:mode:set default
rm -rf generated/* var/*

Steps to reproduce (*)

  1. Create Configurable Product with
    Name & SKU: conf
    Weight: 1
    Price: 1
    Variations:
  • sku: conf-white, qty: 12, price: 10
  • sku: conf-black, qty: 12, price: 10
  1. Perform GraphQL query:
mutation {
  addConfigurableProductsToCart(
    input: {
      cart_id: "gbK3g1pcEiyd39h2clKomLU6qsyFLAVT"
      cartItems: [
        {
          variant_sku: "conf-black"
          data: {
            qty: 13
            sku: "conf-black"
          }
        }
        {
          variant_sku: "conf-white"
          data: {
            qty: 13
            sku: "conf-white"
          }
        }
      ]
    }
  ) {
    cart {
      items {
        id
        qty
        product {
          name
          sku
        }
      }
    }
  }
}

  

Expected result (*)

  1. "message": "The requested qty is not available",

Actual result (*)

  1. "message": "Internal server error",

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions