Understanding and addressing errors during the checkout process.
BagError
type. These errors typically arise from operations like adding or removing products, completing an order, etc. If thereโs an issue on the shop system side when performing these operations, the corresponding error will be captured in BagError
.
code
: Represents the type of error. For instance, PRODUCT_OUT_OF_STOCK
indicates that the product is no longer available.
message
: A human-readable description of the error. This provides a brief explanation of the error, such as โnot enough stockโ.
additionalDetails
: This field provides more context about the error, especially useful when the error pertains to specific items or quantities. The content of additionalDetails
varies based on the operation and the nature of the error.
PRODUCT_OUT_OF_STOCK
: The product is no longer available.PRODUCT_QUANTITY_UNAVAILABLE
: The requested quantity of the product is not available.PRODUCT_INVALID
: The product is invalid or not recognized.INVALID_REQUEST
: The request made to the shop system was invalid.INVALID_COUPON
: The applied coupon code is invalid.add product
API, but the product is out of stock:
errors
array in the response.
For instance, if you make an invalid request or if thereโs an internal error, you might receive a response like: