Error Handling
Where possible the error responses will try to explain what has gone wrong. Most commonly a required field is missing.
Error Response Format
Section titled “Error Response Format”All errors follow a consistent JSON structure:
{ "error": { "code": "error_type", "details": { "field_name": [ "error message" ] }, "message": "Human readable message", "status": 422 }}Common Error Examples
Section titled “Common Error Examples”Missing Required Field
Section titled “Missing Required Field”Status: 422
{ "error": { "code": "unprocessable_entity", "details": { "title": [ "can't be blank" ] }, "message": "Something went wrong", "status": 422 }}Multiple Missing Fields
Section titled “Multiple Missing Fields”Status: 422
{ "error": { "code": "unprocessable_entity", "details": { "owner": [ "must exist" ], "manager": [ "must exist" ] }, "message": "Something went wrong", "status": 422 }}HTTP Status Codes
Section titled “HTTP Status Codes”| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 401 | Unauthorized | Invalid or missing authentication token |
| 403 | Forbidden | Valid token but insufficient permissions |
| 404 | Not Found | Resource not found |
| 422 | Unprocessable Entity | Validation errors in request data |
| 500 | Internal Server Error | Something went wrong on our end |