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. Lengths are counted in UTF-8 bytes (an emoji is 4), dates must be real calendar days, links must be http(s), and a title or name cannot be blank. It is also the answer to a request that is well-formed but not allowed: a move the hierarchy refuses (into a subproject, or a project that holds subprojects into a project), an attachment on a parent that does not exist or is in the trash, an image or file capture moved again after it was filed or deleted (it holds no file any more), filter criteria the grammar does not accept, a recurrence rule the engine cannot read, a move anchor (after/before) that is not in the destination list, or a parent that does not exist.
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, such as deadlne for deadline.
What this code adds
Beyond the fields every problem body carries, validation_failed sets:
{
"errors": [
{
"pointer": "/title",
"message": "must be at most 512 characters"
}
]
}The body
type is https://devs.inittasks.com/errors/validation_failed. instance is the path that failed, here /v1/todos/9C3F1A72-8E4F-4B21-A0D5-3F7B2C1E6A94. For the full RFC 9457 shape, the request_id field and the retry rules, see errors and retries.