init.Tasks openapi.json inittasks.com

HTTP 422

validation_failed

HTTP 422 — Validation failed

When you see it

A field is missing, the wrong type, too long, or not recognised. Unknown fields are rejected rather than ignored.

What to do

Read the errors array: each entry has a JSON Pointer into your request body and a message. A rejected unknown field is usually a typo — deadlne for deadline.

The response

Every error is RFC 9457 problem+json:

json
{
  "type": "https://devs.inittasks.com/errors/validation_failed",
  "title": "Validation failed",
  "status": 422,
  "detail": "a sentence for a developer; never branch on it",
  "instance": "/todos/8E4F2A1B",
  "request_id": "3f9a1c7e-2b44-4d1e-9c30-5a7e8b2d1f60",
  "errors": [
    {
      "pointer": "/title",
      "message": "must be at most 512 characters"
    }
  ]
}

Branch on type, never on detail or on the HTTP status alone — several codes share a status.