Business State Errors
Business State Errors
Business state errors can occur on POST, PUT and DELETE operations. Errors are returned as Structured Messages with Status 409 Conflict.
The following invalid business state errors can be returned.
Message ID | Message Fields | Example Message Template |
---|---|---|
cart.product.not.available | sku-code | Product with '{sku-code}' is not allowed to be added into cart. |
cart.sku.missing.product | sku-code | Missing product on sku object '{sku-code}'. |
cart.product.missing.price | product-id | Missing price for product '{product-id}'. |
cart.product.not.purchasable | sku-code | Product with sku-code '{sku-code}' is not purchasable. |
purchase.payment.failed | shipping-number | Can not complete shipment '{shipping-number}'. Payments have failed. |
purchase.complete.shipment.failed | shipping-number | Complete shipment '{shipping-number}' failed during release shipment phase. |
purchase.customer.not.active | customer-id | Customer with id '{customer-id}' is not active. |
purchase.missing.shipping.address | cart-id | No shipping address set on shopping cart '{cart-id}'. |
purchase.shipping.service.level.missing | cart-id | No shipping service level set on shopping cart '{cart-id}'. |
purchase.shipping.service.level.invalid | cart-id | Invalid shipping service level '{shipping-level}' on shopping cart '{cart-id}' defined. |
purchase.cart.is.empty | cart-id | Shopping cart '{cart-id}' must not be empty during checkout. |
purchase.sku.code.not.available | sku-code | Product with sku-code '{sku-code}' unavailable during checkout. |
purchase.product.insufficient.inventory | product-code | Product with sku-code '{sku-code}' and product-code '{product-code}' is unavailable in sufficient stock during checkout. |
purchase.product.insufficient.inventory.warehouse | warehouse-id | Product with sku-code '{sku-code}' is unavailable in sufficient stock in warehouse '{warehouse-id}' during checkout. |
purchase.product.minimum.quantity.required | sku-code | Product with sku-code '{sku-code}' needs to be ordered as a minimum quantity of '{min-quantity}'. |
profile.email.already.exists | Customer with the given Email address '{email}' already exists. | |
profile.userid.already.exists | user-id | Customer with the given user Id '{user-id}' already exists. |
Warning:
The messages above were generated by converting existing Cortex resource try...catch blocks to return structured messages.
These messages are subject to refactoring in future releases as resources are converted to Helix. Make sure that your client implementation is easy to update as messages are modified, added or deleted.