Librarika Hubfor developers Test environment
Menu

Problem code

validation_failed

Status 422 Unprocessable Entity
Type https://api.librarika.dev.raynux.com/problems/validation_failed
Title Validation failed
Retry Only after you fix the cause.

What it means

One or more fields are invalid. errors lists each one with an RFC 6901 pointer, a field code (required, too_long, too_short, invalid_format, invalid_value, not_unique, not_found, out_of_range, unknown_field) and a translated detail. Unknown body fields are refused (unknown_field), so a typo never silently drops data. A malformed Idempotency-Key header is answered 400 validation_failed with the pointer header.Idempotency-Key.

What to do

Fix each field listed in errors; match on the field code, show the detail.

Example

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json
X-Request-ID: 01JD8Q3W6Y2N5K7M9P0R4S6T8V
{
  "type": "https://api.librarika.dev.raynux.com/problems/validation_failed",
  "title": "Validation failed",
  "status": 422,
  "code": "validation_failed",
  "detail": "One or more fields are invalid.",
  "request_id": "01JD8Q3W6Y2N5K7M9P0R4S6T8V",
  "errors": [
    {
      "pointer": "/name",
      "code": "required",
      "detail": "This field is required."
    }
  ]
}

The type URI https://api.librarika.dev.raynux.com/problems/validation_failed is this page. The detail above is an example of the English text; it is translated into the request's language and may change, so match on code, never on detail.

All problem codes · Errors