{
"error_code": "SINGLE_MERCHANT_CART_REQUIRED",
"field": "merchant_id",
"reason": "A cart can only contain products from one merchant.",
"corrective_action": "Create a separate cart for the other merchant or remove existing items from the current cart.",
"recoverable": true
}
Field
Always there
What it is
error_code
Yes
A stable code. Branch on this, not on the wording.
field
Yes
The input at fault, or null.
reason
Yes
What went wrong, in words.
corrective_action
Yes
What to do next.
recoverable
Yes
true: fix the input and retry. false: do not retry.
example_corrected_call
Sometimes
A minimal corrected call that shows the shape of the fix.
recoverable: true: fix the input as corrective_action says and retry once before telling the buyer.
recoverable: false: do not retry. Tell the buyer and stop.
If retrying does not fix it, show the buyer the error as it is. Do not paraphrase it away.
Warning
example_corrected_call only shows the shape. For restaurant options it picks the first available choices. Ask the buyer; never send the example as it is.
cart_approve and checkout_create refuse with these codes. cart_get and cart_set_quantity do not fail: they return the cart with tax_cents and total_cents set to null and a tax_error field.
Code
Meaning
What to do
TAX_UNAVAILABLE
The tax could not be computed. reason says whether the tax service did not answer, or the shop is not set up for sales tax yet.
Service did not answer: try again in a minute. Shop not set up: pick another shop.
TAX_CODE_MISSING
Some items have no confirmed tax class. product_ids lists them.
Remove those items, or pick another shop.
PREPARED_FOOD_UNAVAILABLE
The shop cannot sell prepared food yet. product_ids lists the items.
Remove those items, or pick another shop. Waiting does not fix it.
Every error is recorded on XEKTA's side before the assistant sees it. feedback_submit is for the one thing the server cannot see: that a well-formed error was wrong or misleading, or that its corrective_action did not work.
The full list, including codes only a shop or an operator can meet, is in the MCP resource xekta://docs/structured-errors.