Skip to main content

E1213 — Input bytes failed schema validation

What happened

The node rejected invalid data. This includes actor codec failures and on-chain handler semantic validation, even when the input bytes decode successfully.

Why it happened

A payload could not be decoded or encoded under the codec the handler declared (CIP-6 §9.5). Despite the catalog wording, this is not limited to the inbound direction or to codec faults. Actor codec failures include both:
  • Inbound decode — the payload does not conform to the expected schema (invalid CBOR structure, wrong field types), or is refused by the declared codec’s profile.
  • Return encode — the handler returned a value its declared codec cannot serialize.
On-chain instruction handlers also use InvalidData (1213) for semantically invalid fields after successful decoding. For example, RunnerRegister rejects a non-empty entitlements field; a registration cannot self-declare pool membership (CIP-2 §7.3). A valid encoding alone does not make that registration acceptable.

How to fix

For an inbound failure, check the encoding and field layout against the target handler’s expected schema, and confirm the caller’s codec= matches the handler’s decode= — the codec is not carried on the wire, so a mismatch cannot be detected for you. For a return failure, check that the returned value is encodable under the handler’s declared codec. Returning bytes passes through unencoded if you have already serialized the payload yourself. For a semantic rejection, check the instruction’s field constraints and authorization rules. For RunnerRegister, leave the self-declared entitlements list empty; that does not grant pool membership. A pool-required job needs the pool owner’s valid direct membership grant (CIP-2 §7.3). Re-encoding the same rejected values does not resolve a semantic validation failure.

Receipt example


All Error Codes

View the complete error code reference