Skip to main content

REST API Error Handling

When basic HTTP authentication fails

Sample request

HTTP Request
GET /api/v1/some_resource HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_API_TOKEN

When validations fail

Sample request

HTTP Request
POST /api/v1/some_resource HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_API_TOKEN
{
"errors": {
"open_till": [
"in_past"
],
"questionnaire_keys": [
"blank",
"invalid"
]
}
}