Skip to content

validation_failed ​

The input did not parse, or broke a rule about its own values.

StatusTitletype
400Validation failedhttps://substrat.net/errors/validation-failed

What it means ​

The request is wrong as sent. A parse failure carries errors: one entry per field, with a dotted path (lines.0.quantity) and a message, and detail reads "the input did not parse". A value that parses but contradicts itself, such as an end date before its start, carries no field list. Its detail is the sentence.

When it is returned ​

  • An operation input that fails its declared schema. The host parses every invocation before the operation's handler runs.
  • A rule over the input's own values.
  • A page cursor replayed into a walk that did not mint it (reason: cursor_restart).

What it carries ​

  • errors: One entry per field that failed to parse: path, dotted into the input, and message.
  • reason: A slug the refusing module owns, narrowing the code. The platform's own are snake_case, but the wire does not enforce a grammar, so compare it as an opaque string. Branch on it; never show it.

Relayed from a scope store, it may also carry storeCode and storeBody. See the body for the members any problem may carry.

What to do ​

Fix the input and send it again; the same body is refused again. With errors, show each message against the field its path names. With reason: cursor_restart, read the first page again without the cursor.

In /openapi.json ​

Documented on every operation's failure responses.

Every error code