Librarika Hubfor developers Test environment
Menu

Problem code

rule_violation

Status 422 Unprocessable Entity
Type https://api.librarika.dev.raynux.com/problems/rule_violation
Title Rule violation
Retry No. The same request gets the same answer until you change it.

What it means

A library rule refuses the action and no more specific code applies. detail says which rule, in the request's language.

What to do

Show detail to the user. Treat it like the other 422 refusals.

Example

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json
X-Request-ID: 01JD8Q3W6Y2N5K7M9P0R4S6T8V
{
  "type": "https://api.librarika.dev.raynux.com/problems/rule_violation",
  "title": "Rule violation",
  "status": 422,
  "code": "rule_violation",
  "detail": "This action is not allowed by the library's rules.",
  "request_id": "01JD8Q3W6Y2N5K7M9P0R4S6T8V"
}

The type URI https://api.librarika.dev.raynux.com/problems/rule_violation 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