The request breaks its rules.
- Code
validation_failed- Type
https://problems.peakintelligence.ch/validation-failed- Status
- 400 Bad Request
- Audience
user. The person using the client can act on it. A client may showdetailto them; it is worded in the request's language.- Service
- Shared: every Peak service answers with it.
Description
The request was read, but one or more of its values break a rule of the endpoint: a required value is missing, a text is too long, a number is out of range, a name is unknown. Each broken rule is one entry of the problem's errors array, with a JSON Pointer to the body member (pointer) or the name of the query or route parameter (parameter), the rule's code, and minimum or maximum when the rule has bounds. Show each entry's detail next to the value it points to when its audience is user; an entry for client is a defect of the calling software. Correct the values and send the request again; sending it unchanged fails the same way.
Example
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
{
"type": "https://problems.peakintelligence.ch/validation-failed",
"title": "The request breaks its rules.",
"status": 400,
"code": "validation_failed",
"audience": "user",
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736"
}
A real answer also carries detail when there is something to say about this occurrence, and may carry errors or members of the type's own, which the service's OpenAPI document describes. When to ask again is the Retry-After header.