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

Commit bd8f044

Browse files
authored
Merge pull request #5943 from atwixfirster/api-errors-addVirtualProductsToCart
magento/devdocs#: Add addVirtualProductsToCart mutation API errors
2 parents f95a6b6 + 853d14a commit bd8f044

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

guides/v2.3/graphql/mutations/add-virtual-products.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,14 @@ Attribute | Data Type | Description
127127
{% include graphql/cart-object.md %}
128128

129129
[Cart query output]({{page.baseurl}}/graphql/queries/cart.html#cart-output) provides more information about the `Cart` object.
130+
131+
## Errors
132+
133+
Error | Description
134+
--- | ---
135+
`Could not find a cart with ID "XXX"` | The specified `cart_id` value does not exist in the `quote_id_mask` table.
136+
`Could not find a product with SKU "YYY"` | A virtual product with the SKU specified in the `data`.`sku` attribute does not exist.
137+
`Required parameter "cart_id" is missing` | The `cart_id` attribute was omitted or contains an empty value.
138+
`Required parameter "cart_items" is missing` | The `cart_items` attribute was omitted or contains an empty value.
139+
`The current user cannot perform operations on cart XXX` | An unauthorized user (guest) tried to add the product into a customer's cart, or an authorized user (customer) tried to add the product into the cart of another customer.
140+
`The product's required option(s) weren't entered. Make sure the options are entered and try again.` | A virtual product has customizable options that were not specified in the mutation, but are required for adding the product into the cart.

0 commit comments

Comments
 (0)