API business error codes, causes, and troubleshooting
This page summarizes common business error codes and handling suggestions, grouped by error type. Error codes may be reused across endpoints; refer to each endpoint's documentation for exact trigger conditions, response structure, and how to determine the call result.
The same
The trailing part of the
First determine the cause from the business
When troubleshooting or contacting support, provide the
code may correspond to multiple causes — use message to pinpoint the cause. The tables list typical scenarios and the response-body status_code, not the transport-layer HTTP status code; a scenario or message does not mean the code applies to only one endpoint.
Dynamic identifiers, indices, and configuration values in the tables are examples; actual responses depend on the current request.
Parameter errors
| code | status_code | Example scenario | message |
|---|---|---|---|
InvalidParameter | 400 | Neither agent_id nor pipeline_id_list provides a valid value | Agent application not found. |
InvalidParameter | 400 | The service is not a knowledge retrieval scene | Agent application scene must be search |
InvalidParameter | 400 | Service configuration missing | Agent application config is invalid |
InvalidParameter | 400 | query exceeds the length limit | Parameter(query) exceeds the limit of (4500 bytes) |
InvalidParameter | 400 | Vector retrieval lacks query text and has no usable image-search knowledge base | Required parameter(query) missing or invalid, please check the request parameters. Query is required when the query is not a pure image search.. |
InvalidParameter | 400 | Wiki retrieval query missing or empty | Required parameter(query) missing or invalid, please check the request parameters. Query is required for wiki retrieval.. |
InvalidParameter | 400 | images exceeds the item limit | Parameter(image_list) exceeds the limit of (10) |
InvalidParameter | 400 | The number of knowledge bases to retrieve exceeds the limit | Parameter(pipeline_id_list) exceeds the limit of (15) |
InvalidParameter | 400 | file_id_list exceeds the item limit | Parameter(file_id_list) exceeds the limit of (10) |
InvalidParameter | 400 | Wiki retrieval with non-empty file_id_list | Required parameter(file_id_list) missing or invalid, please check the request parameters. file_id_list is not supported for wiki retrieval.. |
InvalidParameter | 400 | A kb_search_configs element's id missing or blank | Required parameter(kb_search_configs[0].id is required) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | id is not bound to the service's knowledge base | Required parameter(kb not bound to agent: kb_xxx) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | Duplicate id | Required parameter(duplicate kb id in kb_search_configs: kb_xxx) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | Merged search_filters exceed the length limit | Required parameter(search_filters) missing or invalid, please check the request parameters. pipeline_configs.kb_xxx.search_filters total bytes must less than 80000. |
InvalidParameter | 400 | Unstructured knowledge base tags exceeds the item limit | Required parameter(search_filters[0].tags) missing or invalid, please check the request parameters. pipeline_configs.kb_xxx.search_filters[0].tags array size must not exceed 1000. |
InvalidParameter | 400 | Wiki retrieval uses an unsupported filter field | Required parameter(search_filters) missing or invalid, please check the request parameters. Wiki search_filters contains invalid key 'tags'. Allowed: [page_type, folder_id, category_path]. |
InvalidParameter | 400 | List Agents agent_scene missing | Required parameter(agent_scene is empty error) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | List Agents agent_scene invalid | Required parameter(agent_scene is invalid error) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | List Agents search_type invalid | Required parameter(search_type must be one of: chunk, wiki) missing or invalid, please check the request parameters. |
InvalidParameter | 400 | Only one of knowledgeType and knowledgeScene provided when creating a knowledge base | Invalid parameter: knowledgeType and knowledgeScene cannot be empty |
InvalidParameter | 400 | knowledgeType and structureType mismatch when creating a knowledge base | Invalid parameter: knowledgeType and structureType do not match |
InvalidParameter | 400 | knowledgeScene does not belong to the knowledgeType when creating a knowledge base | Invalid parameter: knowledgeType and knowledgeScene do not match |
InvalidParameter | 400 | Ultra-fast Q&A sinkType is not BUILT_IN | Invalid parameter: Lite Rag only supports BUILT_IN sink type |
InvalidParameter | 400 | Multimodal embedding model missing or invalid for image Q&A or visual understanding scenes | Invalid parameter: invalid multi embedding model |
DocEmptyError | 400 | docIds empty or file IDs do not exist when creating and importing a knowledge base | fetch empty doc list from data center. |
InvalidParameter | 400 | wiki_auto_update missing or not true when enabling | Required parameter(wiki_auto_update) missing or invalid, please check the request parameters. must be true. |
WikiConfigInvalid | 400 | The entire extraction group missing when enabling | wiki_config parameter(extraction) is invalid: required |
WikiConfigInvalid | 400 | synthesis_model_id missing or blank when enabling | wiki_config parameter(synthesis_model_id) is invalid: required |
WikiConfigInvalid | 400 | synthesis_model_id blank when modifying configuration | wiki_config parameter(synthesis_model_id) is invalid: must not be blank |
WikiConfigInvalid | 400 | synthesis_model_id not in the candidate list | wiki_config parameter(synthesis_model_id) is invalid: not in the whitelist |
WikiConfigInvalid | 400 | extraction_granularity value invalid | wiki_config parameter(extraction_granularity) is invalid: must be one of focused / standard / exhaustive |
WikiConfigInvalid | 400 | content_instructions exceeds the length limit | wiki_config parameter(content_instructions) is invalid: length must not exceed 4000 characters |
WikiConfigInvalid | 400 | extraction_instructions exceeds the length limit | wiki_config parameter(extraction_instructions) is invalid: length must not exceed 4000 characters |
Authentication errors
| code | status_code | Example scenario | message |
|---|---|---|---|
InvalidApiKey | 401 | API Key invalid or missing | Invalid API-key provided. |
Service activation and billing
| code | status_code | Example scenario | message |
|---|---|---|---|
ServiceStatusInvalid | 401 | Service not activated or billing abnormal | index service status is invalid. please check your bill info. |
BailianIndexServiceNotOpen | 400 | Knowledge base service not activated | Bailian Knowledge Base service is not activated. |
BailianIndexServiceOutOfCredit | 400 | Knowledge base service in arrears | Bailian Knowledge Base service is out of credit. |
Agent service errors
| code | status_code | Example scenario | message |
|---|---|---|---|
RagAgentNotExist | 400 | No version specified and the service is not published | Agent application not published. |
RagAgentNotExist | 400 | The specified service version does not exist | Agent application not found. |
RagAgentGroupNotExist | 400 | The Agent service does not exist | Agent application not found. |
Knowledge base and Wiki status errors
| code | status_code | Example scenario | message |
|---|---|---|---|
PipelineNotExist | 400 | The directly retrieved knowledge base does not exist | Pipeline not found: kb_xxx |
PipelineNotExist | 400 | The retrieved knowledge base does not exist or is not in the current workspace | pipeline not exist, pipeline_id: kb_xxx, workspace: workspace_xxx |
PipelineMixed | 400 | Knowledge base configuration mismatch | Pipeline not correct, please check |
PipelineMixed | 400 | Mixing public and private knowledge bases | public and private pipeline mixed |
PipelineFrozen | 400 | The knowledge base is frozen or being unfrozen | pipeline kb_xxx is frozen, please unfreeze or wait unfreezing finish |
PipelineConfigNotExist | 400 | Knowledge base configuration does not exist | pipeline config not exist |
WikiNotEnabled | 400 | Not all bound knowledge bases have Wiki enabled | wiki is not enabled, pipeline_id: kb_xxx |
WikiPreconditionNotMet | 400 | The knowledge base does not exist or does not belong to the current account | wiki operation is not allowed on pipeline(kb_xxx): pipeline does not exist or does not belong to the current user |
WikiPreconditionNotMet | 400 | The knowledge base service is not yet provisioned; retry later | wiki operation is not allowed on pipeline(kb_xxx): pipeline service is not provisioned yet, please retry later |
WikiPreconditionNotMet | 400 | The knowledge base was already deleted when enabling | wiki operation is not allowed on pipeline(kb_xxx): pipeline does not exist or is deleted |
WikiEditionNotSupported | 400 | The knowledge base is not enterprise when enabling | wiki is only available for enterprise edition pipeline, pipeline(kb_xxx) |
WikiSceneNotSupported | 400 | The knowledge scene is not document Q&A when enabling | wiki is only available for basic document qa pipeline, pipeline(kb_xxx) |
WikiOperationConflict | 409 | The knowledge base is being enabled/disabled, or another Wiki operation is in progress | another wiki operation on pipeline(kb_xxx) is in progress, please retry later |
Server errors
The trailing part of the message for WikiProvisionFailed and WikiCollectionDeclareFailed varies with the failure cause; the table shows examples.
| code | status_code | Example scenario | message |
|---|---|---|---|
WikiConfigError | 500 | Wiki configuration missing or corrupted | wiki config error, pipeline_id: kb_xxx, reason: wiki_config is null |
WikiStatusReadFailed | 500 | Failed to read the Wiki enable status | wiki status read error, pipeline_id: kb_xxx |
PipelineCacheReadError | 500 | Failed to read the knowledge base cache | pipeline cache read error, cache_key:cache_key_xxx |
PipelineEmbeddingError | 500 | Knowledge base embedding model configuration abnormal | pipeline embedding config(config_xxx) error. |
PipelineRerankError | 500 | Knowledge base rerank model configuration abnormal | pipeline rerank config(config_xxx) error. |
ConfigError | 500 | Retrieval configuration abnormal | config error |
SpResultError | 500 | The retrieval service returned no result | sp result error:(sp result is null). |
SpServiceResultError | 400 | The retrieval service returned a failure | sp result error:(%s). |
WikiProvisionFailed | 500 | Internal service error during enabling | wiki provision failed for pipeline(kb_xxx): wiki embedding dimension cannot be resolved, model: text-embedding-v4 |
WikiCollectionDeclareFailed | 500 | Internal service error during enabling | wiki index collection declare failed for pipeline(kb_xxx): update sink_config failed, pipelineServiceId: 12345 |
SystemError | 500 | Internal service exception | system error |
Retry strategy
First determine the cause from the business code and message, then decide whether to retry based on the transport-layer HTTP status code.
| Error type | Retry | Suggestion |
|---|---|---|
| Parameter, authentication, or permission failure | Do not auto-retry | Fix the parameters or credentials and confirm permissions before resending. |
| Resource missing, service not activated, or configuration abnormal | Do not auto-retry | Check the resource, service status, and configuration; even if the business status_code is 500 for a configuration error, address the cause first. |
| Rate limiting | Retryable | If the response includes Retry-After, wait as instructed; otherwise use backoff retry. |
| Temporary service exception | Limited retry | Suggested intervals of 1s, 2s, 4s with random jitter, up to 3 retries; contact support if failures persist. |
| Timeout or connection interruption | Depends on the request | Read-only requests can use backoff retry; for write requests, first confirm whether the operation succeeded to avoid duplicate creation or submission. |
request_id to quickly locate the issue.