Skip to content

validation_failed

Error codeView as Markdown

Some fields are not valid. The request was readable, but one or more fields broke a rule. The errors[] array names each field (as a JSON Pointer) and says what is wrong with it.

  • HTTP status: 422 Unprocessable Content
  • CLI exit code: 2 (the request or file is not valid)
  • Retry: not as it is; the same request will fail the same way until the cause is fixed

Correct the fields listed in errors[] and retry.

  1. Read each entry in errors[]: it has pointer, code and detail.
  2. Fix those fields and send the request again with a new Idempotency-Key.
{
"type": "https://guv.dev/errors/validation_failed",
"title": "Some fields are not valid",
"status": 422,
"code": "validation_failed",
"detail": "The request was readable, but one or more fields broke a rule.",
"fix": "Correct the fields listed in errors[] and retry.",
"docs_url": "https://guv.dev/errors/validation_failed",
"request_id": "req_01jbx2m9k7q4r8t5v6w3y0z1rq"
}

The code field is stable: match on it, not on title or detail, which may be reworded.