Error Codes
Standardized API error semantics and recommended status mapping.
Response envelope
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message",
"statusCode": 400
}
}
Core error catalog
| Code | Status | Typical trigger |
|---|---|---|
UNAUTHORIZED | 401 | Missing auth session |
FORBIDDEN | 403 | Access outside member/role scope |
VALIDATION_ERROR | 400 | Zod schema mismatch |
NOT_FOUND | 404 | Resource missing by id/code |
GROUP_FULL | 400 | Join request exceeds maxMembers |
ALREADY_MEMBER | 409 | Duplicate group membership |
INVALID_JOIN_CODE | 404 | Join code lookup miss |
CONFLICT | 409 | Resource state conflict |
INTERNAL_ERROR | 500 | Unhandled server exception |
Design guidelines
- Keep
codestable for frontend branching and telemetry. - Use
messagefor user-facing fallback copy. - Include field-level validation details for
VALIDATION_ERRORwhen available.