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."
  }
}
PrefixCategoryExample
VALIDATION_*Invalid inputMissing required field
AUTH_*AuthenticationInvalid credentials
ACCESS_*AuthorizationInsufficient permissions
FK_*Foreign keysReferenced row not found
SCHEMA_*Schema errorsInvalid column type
RATE_*Rate limitsToo many requests
STORAGE_*File storageFile too large

HTTP status codes

StatusMeaning
200Success
201Created
400Validation error
401Authentication required / invalid
403Forbidden (insufficient permissions)
404Not found
409Conflict (duplicate unique value)
429Rate limit or plan quota exceeded