When it fires
The request body failed Zod schema parse. One or more fields are missing, malformed, or out of range.Why it happens
- Required field is missing or
null. - Field has the wrong type (e.g.,
amountsent as a number instead of a string — we use string for arbitrary-precision USDC amounts). - Field violates a constraint (UUID format, enum value, min/max length).
- An unknown extra field was sent — we accept extras (
.passthrough()) so this is rarely the cause; if it is, you’ll see it called out indetail.
How to fix
- The
detailfield carries the path of the first offending field (e.g.,body.outcomeIndex must be a non-negative integer). - Cross-reference with the OpenAPI spec at
https://api.kash.bot/v1/openapi.json— every endpoint’s request body is fully typed there. - If you’re using the TS SDK, you’d have caught this client-side via
KashValidationErrorbefore the request went out.
Example
Related codes
AMOUNT_TOO_LARGE— specific case foramountexceeding the per-trade capOUTCOME_INDEX_INVALID— specific case for invalidoutcomeIndex