Ga naar hoofdinhoud

REST API Error Handling

When basic HTTP authentication fails

Sample request

GET /api/v1/some_resource
Status: 401 Unauthorized

When validations fail

Sample request

POST /api/v1/some_resource
Status: 422 Unprocessable Entity
{
"errors": {
"open_till": [
"in_past"
],
"questionnaire_keys": [
"blank",
"invalid"
]
}
}