Stats
Actions
Tags
From praxis
API error response format — machine-readable codes, human-readable reasons, status code rules.
How this skill is triggered — by the user, by Claude, or both
Slash command
/praxis:api-error-patternsWhen to use
Writing API error handling, choosing HTTP status codes, designing error response shapes.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
All API error responses use a consistent format:
All API error responses use a consistent format:
{
"detail": {
"code": "UPPER_SNAKE_CASE_CODE",
"reason": "Human-readable message."
}
}
code: Machine-readable identifier. Frontend uses this for branching logic (redirect to verification, show specific field errors).reason: User-facing message. Frontend can display directly. Always a complete sentence ending with a period.| Status | When to Use |
|---|---|
| 200 | Successful operation that returns data |
| 201 | Resource created |
| 204 | Success with no body (logout, delete, disable) |
| 400 | Client sent bad data (invalid input, bad credentials) |
| 403 | Authenticated but forbidden (wrong password, disabled feature, insufficient role) |
| 404 | Resource not found |
| 409 | Conflict (duplicate resource) |
| 429 | Too many requests (rate limit exceeded) |
| 500 | Unexpected server error (never intentional except for genuine internal failures) |
{"code": "...", "reason": "..."} formatUPPER_SNAKE_CASE for codesGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub jartan-llc/grimoire --plugin praxis