Error Handling
Every error includes a suggestion field — actionable instructions for agents and developers.
{
"error": {
"code": "FK_NOT_FOUND",
"message": "Foreign key 'user_id' references row 'abc' which does not exist",
"suggestion": "Create the referenced user first, then retry."
}
}
| Prefix | Category | Example |
VALIDATION_* | Invalid input | Missing required field |
AUTH_* | Authentication | Invalid credentials |
ACCESS_* | Authorization | Insufficient permissions |
FK_* | Foreign keys | Referenced row not found |
SCHEMA_* | Schema errors | Invalid column type |
RATE_* | Rate limits | Too many requests |
STORAGE_* | File storage | File too large |
HTTP status codes
| Status | Meaning |
| 200 | Success |
| 201 | Created |
| 400 | Validation error |
| 401 | Authentication required / invalid |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not found |
| 409 | Conflict (duplicate unique value) |
| 429 | Rate limit or plan quota exceeded |