Errors
Error response format and common codes.
All error responses are JSON with the shape below:
{
"message": "Input validation failed",
"code": "BAD_REQUEST",
"issues": [
{
"path": ["name"],
"message": "Required"
}
]
}Common Causes
- Missing required fields
- Invalid IDs or workspace access
- Rate limits exceeded
- Jobs not ready yet (poll later)
Error Codes
BAD_REQUEST- Invalid input or failed validationUNAUTHORIZED- Missing or invalid API keyFORBIDDEN- Access denied for this workspaceNOT_FOUND- Resource does not existTOO_MANY_REQUESTS- Rate limit exceededINTERNAL_SERVER_ERROR- Unexpected failure
Tips
- Always check
res.okbefore reading JSON. - For validation errors, inspect
issuesto find the exact field. - For auth uncertainty, call
GET /auth/validatewith the same Bearer key. - For route 404s, fetch
/api/openapi.jsonand avoid guessed endpoints.