400 Attempt Failed
The server will not process the request due to validation error.
The client can try again after fixing the indicated validation issue IFF number of remainingAttempts
is greater than 0
.
Extra metadata
remainingAttempts
remainingAttempts
A number
indicating number of remaining attempts the client can re-try the submission before needing to restart the process.
Usually used around some verification process, i.e. in a user profile collection were user needs to provide a verification code for email or phone number.
fields
fields
Optional
A optional property which is a JSON object listing validation issues where the key is the name of the field and the value is validation issue. These fields should refer to the primary entity being validated by the endpoint, for instance query parameters for GET requests, request body for POST requests.
For nested input objects, the server can either use nested objects ({ "person": { "lastName": "Issue" } }
or the path to the field ({ "person.lastName": "Issue" }
).
These validation issues should be written in such a way that they can be presented to the user. As such, they should be localized according to the user locale, for example using the Accept-Language header.
Example
Last updated