OrderingApiError
The body of a failure response from an operation on this API: one envelope, whatever the status code.
Unlike a success reply, every field except txId is always present: when an operation produces an error body it produces all of it, so you can read path or message without a null check.
Two responses are produced before a request reaches an operation and do not carry this envelope: the 400 for a body that is not valid JSON, and a 429 from the rate limiter, which may have no body at all.
Fields
- statusCodenumberrequired
The HTTP status, repeated in the body so a caller that logs only the body still knows what happened. Always the same number as the status line, never a second, body-only code.
- timestampstring<date-time>required
When we produced the failure, ISO-8601 UTC.
- pathstringrequired
The ROUTE that failed, for example
/ordering/orders/createOrder. No query string. - methodstringrequired
The HTTP method of the failed call. Always
POSTon this API. - messagestringrequired
A human-readable summary, for a human. Do not branch on it: it is not part of the contract and changes without notice. Branch on
statusCodeand on documented fields. - txIdstring
The support handle: the identifier for THIS one call, the same value on the
x-mealco-tx-idresponse header and on every log line the call produced. Quote it in a ticket and we can pull the complete record of that single call.Optional for one reason: a request whose body is not valid JSON is rejected before it reaches an operation, so that one
400answers a bare{"message": "Bad Request"}with notxIdand no header. Every failure that an operation produces carries the full envelope including this field.