ErrorInterface
Magento\Quote\Api\ErrorInterface
What it does
This interface defines the contract for error objects related to quote/cart operations in Magento 2.
Developers implement this interface when creating custom error handlers for cart-related validations or operations, allowing them to capture error codes, affected cart item positions, and descriptive messages.
It's particularly useful when processing bulk cart operations or validations that need to report specific item-level errors.
Public Methods
- getCode()
- getCartItemPosition()
- getMessage()