RAG API error responses, HTTP status codes, business error codes, and retry strategy.
Every error response uses the same structure:
Error codes for enabling Wiki on a Flagship knowledge base and for Wiki retrieval are below. Actual responses may prefix the
Every response includes a
HTTP status codes
| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid request parameter | Verify the parameter |
| 401 | Authentication failed | Check your API key |
| 403 | Forbidden | Request the appropriate permission scope |
| 404 | Resource not found | Verify the ID |
| 409 | Resource conflict | Usually a duplicate name |
| 413 | Request body too large | Split the request |
| 429 | Rate limited | Back off and retry |
| 500 | Internal server error | Retry; contact support if it persists |
| 503 | Service unavailable | Back off and retry |
Business error codes
| code | HTTP | Meaning |
|---|---|---|
| INVALID_PARAMETER | 400 | Parameter missing or malformed |
| UNAUTHORIZED | 401 | API key missing or invalid |
| FORBIDDEN | 403 | No permission for this operation |
| KB_NOT_FOUND | 404 | Knowledge Base not found |
| DOCUMENT_NOT_FOUND | 404 | Document not found |
| DATA_SOURCE_NOT_FOUND | 404 | Data source not found |
| KB_NAME_CONFLICT | 409 | Knowledge Base name already exists |
| QUOTA_EXCEEDED | 429 | Tenant quota exceeded |
| RATE_LIMITED | 429 | Endpoint rate limit hit |
| EMBEDDING_FAILED | 500 | Embedding service error |
| RETRIEVAL_TIMEOUT | 504 | Retrieval timed out — lower top_k or use a smaller Rerank model |
| SYNC_SOURCE_UNREACHABLE | 502 | Data source connection failed |
Wiki-related error codes
Error codes for enabling Wiki on a Flagship knowledge base and for Wiki retrieval are below. Actual responses may prefix the code with the service name (e.g. Index.WikiConfigInvalid). Wiki configuration request fields use camelCase (e.g. wikiAutoUpdate, synthesisModelId), but on validation failure the field names in message are snake_case (e.g. wiki_auto_update, synthesis_model_id) — note the mapping.
| code | HTTP | Description |
|---|---|---|
WikiNotEnabled | 400 | Not all knowledge bases bound to the service have Wiki enabled during Wiki retrieval |
WikiPreconditionNotMet | 400 | The knowledge base does not exist, does not belong to the current account, has been deleted, or its service is not yet provisioned |
WikiEditionNotSupported | 400 | The knowledge base is not Flagship when enabling Wiki; or downgrading to Standard while requesting enable |
WikiSceneNotSupported | 400 | The knowledge scene is not basic_document_qa when enabling Wiki |
WikiOperationConflict | 409 | Requesting disable while enabling is in progress, requesting enable while disabling is in progress, or another Wiki operation is in progress |
WikiConfigInvalid | 400 | Invalid Wiki configuration key, e.g. missing extraction group, missing or non-whitelisted synthesisModelId, invalid extractionGranularity, or over-length instructions; locate by the field name in message |
Retry strategy
| Error type | Retry? | Interval |
|---|---|---|
| 4xx (except rate limits) | No | — |
| 429 rate limited | Yes | Honor the Retry-After header, or back off 1s / 2s / 4s |
| 5xx | Yes | 1s / 2s / 4s, up to 3 retries |
| 504 timeout | Yes | Retry immediately, up to 2 times |
Troubleshooting
Every response includes a request_id. Include it when contacting support — it pinpoints the request in our logs.