目录

ArkTS API Error Codes

This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.

1021000000 Insufficient System Resource or Memory Access Exception

Error Message

Insufficient system resources or memory access exception.

Error Description

The system resources are insufficient or an exception occurred during memory access.

Possible Causes

  1. Insufficient system resources.

  2. A system error, such as null pointer, unexpected restart of the data service, I/O error, or JS engine exception, occurs.

Solution

  1. Clear the memory and try again.

  2. If the problem persists, restart or update the app or upgrade the device version.

1021000001 Calling the LLM Timed Out

Error Message

A timeout occurred when calling the LLM.

Error Description

A timeout error occurred during the interaction with the LLM.

Possible Causes

A timeout error occurred when your app requested the LLM in streamChat.

Solution

  1. Call streamRun again.

  2. If the retry fails multiple times, adjust the LLM parameters used in streamChat and optimize the corresponding implementation.

1021000002 Loading Failed When Calling LLM

Error Message

A loading failure occurred when calling the LLM.

Error Description

A loading error occurred during the interaction with the LLM.

Possible Causes

A loading error occurred when your app requested the LLM in streamChat.

Solution

  1. Call streamRun again.

  2. If the retry fails multiple times, adjust the LLM parameters used in streamChat and optimize the corresponding implementation.

1021000003 Calling the LLM Failed

Error Message

A request failure occurred when calling the LLM.

Error Description

A request failed during the interaction with the LLM.

Possible Causes

Your app failed to request the LLM in streamChat.

Solution

  1. Call streamRun again.

  2. If the retry fails multiple times, adjust the LLM parameters used in streamChat and optimize the corresponding implementation.

1021000004 LLM Busy

Error Message

The LLM chat is busy.

Error Description

The LLM is busy during interaction.

Possible Causes

The LLM is busy when your app requests the LLM in streamChat.

Solution

  1. Call streamRun again.

  2. If the retry fails multiple times, adjust the LLM parameters used in streamChat and optimize the corresponding implementation.

1021000005 LLM Output Does Not Meet Constraints

Error Message

The output of LLM chat does not comply with the constraints.

Error Description

The length of the LLM response exceeds the limit.

Possible Causes

When your app sends an LLM request in streamChat, the total length of the response data forwarded to RAG exceeds 8192 bytes.

Solution

Check the LLM response, check that the response is correctly parsed, and check that the data sent to RAG is correctly assembled.

1021000006 RAG Session Already Exists

Error Message

The RAG session already exists.

Error Description

The RAG session already exists.

Possible Causes

The RagSession is not closed, and a new RagSession is created repeatedly.

Solution

If Config remains unchanged, you can continue the session using the previous RagSession. Otherwise, use the close API to close the old RagSession, and then use the new Config to call the createRagSession API to create a new RagSession for the session.

1021000007 RAG Session Busy

Error Message

The RAG session is busy.

Error Description

The RAG session is busy.

Possible Causes

streamRun is called again during the previous streamRun response to start a new round of Q&A.

Solution

If you want to retain the previous answer, wait until the previous streamRun ends, and then call streamRun again to start a new round of Q&A.

1021000008 RAG Session Closed

Error Message

The RAG session is already closed.

Error Description

The RAG session has been closed.

Possible Causes

When the RagSession API is called, the RagSession has been closed.

Solution

Before calling the RagSession API, ensure that a RagSession has been enabled.

1021000009 User Canceled streamRun

Error Message

User has canceled the stream run.

Error Description

The user has canceled streamRun.

Possible Causes

You have canceled the streamRun when calling the streamRun API.

Solution

Cancel streamRun as required.

1021000010 Timeout Occurred in a Session

Error Message

A timeout occurred in the session.

Error Description

A timeout error occurred in a session.

Possible Causes

The retriever timed out when retrieving data.

Solution

Try to call the streamRun API again.

1021000011 Some Parameters Do Not Meet Constraints

Error Message

Some parameter does not meet the constraints.

Error Description

Some parameters do not meet the constraints.

Possible Causes

The Config parameter passed to createRagSession does not meet the constraints.

Solution

Refer to the API reference to correctly configure Config.

1021000012 Knowledge Base Unavailable

Error Message

The knowledge base is not available.

Error Description

The knowledge base is unavailable.

Possible Causes

  1. The knowledge processing schema is not configured.

  2. The knowledge processing schema is incorrectly configured.

Solution

  1. Before using the RAG capability, ensure that the knowledge processing schema has been configured.

  2. Ensure that the format and content of the schema configuration file meet related requirements.

1021000013 Retrieval: Retrieval Error

Error Message

Retrieval: An error occurred during the Retrieval.

Error Description

An error occurred during retrieval.

Possible Causes

  1. An error occurred in the recall phase of the retrieval module. For example, the internal status of the service is abnormal, or the input parameters are incorrect.

  2. An error occurred in the re-ranking phase of the retrieval module. For example, the service status is abnormal, or the ranking logic is incorrect.

Solution

  1. Ensure that the input parameters meet the requirements.

  2. Ensure that the service status is normal and initialization is complete.

  3. Check the internal logic of the service and ensure that the ranking method meets the expectation.

1021000014 Retrieval: Invalid Primary Keys

Error Message

Retrieval: There are invalid primary keys.

Error Description

There is an invalid primary key.

Possible Causes

  1. The number of primary keys configured for multiple recall processes is inconsistent.

  2. The configured primary key is an empty string.

Solution

  1. Ensure that the input primary key is correct.

  2. Correct the primary key information in Config and try again.

1021000015 Retrieval: Re-ranking Algorithm Does Not Support Composite Primary Keys

Error Message

Retrieval: A re-ranking algorithm that does not support composite primary keys was used.

Error Description

A re-ranking algorithm that does not support composite primary keys is used.

Possible Causes

Only the RRF re-ranking algorithm supports composite primary keys.

Solution

  1. Ensure that the number of primary keys does not exceed the upper limit allowed by the algorithm.

  2. Correct the Config parameter and try again.

1021000016 Retrieval: Invalid Filter Input

Error Message

Retrieval: The filter input is invalid.

Error Description

The filter input is invalid.

Possible Causes

  1. Mandatory fields are missing.

  2. For the BETWEEN operation, the range field is not defined.

  3. For the non-BETWEEN operation, the value field is not defined.

Solution

  1. Check the filter parameter.

  2. Correct the Config parameter and try again.

1021000017 Retrieval: Invalid Recall Name in RecallCondition

Error Message

Retrieval: There are invalid recall names in RecallCondition.

Error Description

Invalid recall names exist in RecallCondition.

Possible Causes

The recallName fields in different RecallCondition entries are the same.

Solution

  1. Check the name of the recallName field in each RecallCondition and ensure that the value is valid.

  2. Correct the Config parameter and try again.

1021000018 Retrieval: Vector Similarity Threshold in VectorQuery Is Higher Than the Tiering Threshold in VectorRerankParameter

Error Message

Retrieval: The vector similarity threshold in VectorQuery is higher than the tiered threshold in VectorRerankParameter.

Error Description

The similarity threshold in VectorQuery exceeds the tiered threshold in VectorRerankParameter.

Possible Causes

The input similarity threshold in VectorQuery is higher than the minimum tiered threshold in VectorRerankParameter.

Solution

  1. Check the parameter settings in VectorQuery and ensure that the parameter settings are within a proper range.

  2. Correct the Config parameter and try again.

1021000019 Retrieval: RerankMethod Does Not Match the Channel Type

Error Message

Retrieval: RerankMethod parameters do not match the channel type.

Error Description

The values of the RerankMethod parameters do not match the channel type.

Possible Causes

The input parameters do not match the channel type.

Solution

  1. Ensure that the input parameters match the channel type.

  2. Correct the Config parameter and try again.

1021200001 Database File Corrupted

Error Message

The database is corrupted.

Error Description

The database is corrupted when read() or write() is called.

Possible Causes

The database file is corrupted.

Solution

Currently, the database cannot be backed up or restored. If data loss is acceptable, delete the database instance and create a new one.

1021200002 Database or Transaction Closed

Error Message

The database is closed.

Error Description

The database or transaction is closed.

Possible Causes

  1. Before the current operation, the close API has been called to close the database or the database failed to be opened or created.

  2. Before the current operation, the commit API has been called to commit the transaction or the rollback API has been called to roll back the transaction.

Solution

  1. Call the getStore API to open or create the database again. Ensure that the input parameters are correct.

  2. Call the createTransaction API to create a transaction again.

1021200003 Database Busy

Error Message

The database is busy.

Error Description

The database is busy.

Possible Causes

  1. Multiple processes of the same app are performing concurrent read/write operations on the same database.

  2. Multiple threads in a process are performing concurrent read/write operations, causing a read/write operation timeout in a thread.

  3. The write API has been called to write data but the transaction has not been committed or rolled back.

Solution

  1. Avoid concurrent database operations from processes.

  2. Wait for a while and try again.

  3. Commit or roll back the unclosed transaction.

1021200004 Insufficient Database Memory

Error Message

The database is out of memory.

Error Description

The database memory is insufficient.

Possible Causes

The data volume is too large or the memory allocated is insufficient.

Solution

Reduce the data volume or free up some memory by terminating unnecessary processes.

1021200100 SQLite: Generic Error

Error Message

SQLite: Generic error.

Error Description

This error code is reported if an SQLite generic error occurs.

Possible Causes

An SQL statement is executed to perform any of the following operations:

  1. Insert or update data in a table that is not created.

  2. Insert or update data in a column that does not exist.

  3. Query data from a table or column that does not exist.

  4. Call an undefined function. For details, see SQLITE_ERROR.

Solution

Analyze the SQL statement and correct the error.

1021200101 SQLite: Access Denied

Error Message

SQLite: Access permission denied.

Error Description

This error code is reported if the SQLite access is denied.

Possible Causes

  1. SQLite does not have the required permission to access or modify a file.

  2. See SQLITE_PERM.

Solution

  1. Ensure that the file is not read-only. If the file is read-only, remove the read-only property.

  2. Check that the caller has the required permissions to read and write data to the file or folder.

  3. Check whether the file system is read-only. If yes, change it to writable.

  4. Ensure that the database file is not being used by another process. Terminate the process that is using the file.

  5. When handling permission issues, ensure that you have the permission to change the permissions on the file or folder.

1021200102 SQLite: Database File Locked

Error Message

SQLite: The database file is locked.

Error Description

This error code is reported if the SQLite database file is locked.

Possible Causes

  1. Two processes of the same app, for example, UIability and DataShareability, perform addition, deletion, and modification operations in the same database, or processes in the same group of different apps perform addition, deletion, and modification operations in the same database via the group.

  2. See SQLITE_BUSY.

Solution

  1. Avoid concurrent database operations from processes.

  2. Wait for a while and try again.

1021200103 SQLite: I/O Error

Error Message

SQLite: Some kind of disk I/O error occurred.

Error Description

An I/O error occurred in the SQLite.

Possible Causes

The possible causes include but are not limited to:

  1. File not found.

  2. The file is read-only.

  3. The disk space is insufficient.

  4. The file is damaged.

  5. See SQLITE_IOERR.

Solution

  1. Ensure that the file path is correct and the file exists.

  2. Ensure that the file is not read-only.

  3. Delete unnecessary files to ensure sufficient disk space.

  4. Check that the caller has permissions to read and write the file.

1021200104 WAL File Size Exceeds the Default Limit

Error Message

SQLite: The WAL file size exceeds the default limit.

Error Description

This error code is reported if the WAL file exceeds 512 MB, which is the default limit.

Possible Causes

Data is added, deleted, and modified continuously without closing the read transaction or result set. As a result, the WAL file size exceeds the default upper limit.

Solution

  1. Check for unclosed result sets or transactions.

  2. Close all result sets or transactions.

1021200105 Unable to Open the Database File

Error Message

SQLite: Unable to open the database file.

Error Description

The database file cannot be opened.

Possible Causes

  1. The file does not exist, and the database fails to be created.

  2. The database file exists but is damaged.

  3. The SQLite does not have permission to read or write the database file.

  4. The disk space is insufficient.

  5. Refer to SQLITE_CANTOPEN.

Solution

  1. Check that the database file path is correct and the caller has the permission to read and write the file.

  2. Check that the disk space is sufficient.

1021201000 Retrieval: Recall error

Error Message

Retrieval: An error occurred during the recall phase.

Error Description

An error occurred in the recall phase of the retrieval module.

Possible Causes

The internal status of the service is abnormal, or the input parameters are incorrect.

Solution

  1. Ensure that the input parameters meet the requirements.

  2. Ensure that the service status is normal and initialization is complete.

1021201001 Retrieval: Re-ranking error

Error Message

Retrieval: An error occurred during the re-ranking phase.

Error Description

An error occurred in the re-ranking phase of the retrieval module.

Possible Causes

The service status is abnormal, or the ranking logic is incorrect.

Solution

  1. Ensure that the input ranking parameters are correct.

  2. Check the internal logic of the service and ensure that the ranking method meets the expectation.

1021201002 Retrieval: Numerical parameter out of range

Error Message

Retrieval: The value of the numerical parameter is outside the constrained range.

Error Description

The value of a numeric parameter is out of range.

Possible Causes

The provided parameter value does not meet the setting requirements.

Solution

  1. Check the input numeric parameter and ensure that the parameter value meets the setting requirements.

  2. Change the parameter value and try again.

1021201003 Retrieval: Invalid primary keys

Error Message

Retrieval: The primary key is invalid.

Error Description

The provided primary keys do not meet the setting requirements.

Possible Causes

  1. The number of primary keys used in the recall parameters is inconsistent across multiple recall processes.

  2. The number of primary keys in the recall API parameters is empty.

  3. The primary key in the recall API parameters is an empty string.

Solution

  1. Ensure that the input primary key is correct.

  2. Correct the primary key information in the recall process and try again.

1021201004 Retrieval: Unsupport composite primary key in re-ranking

Error Message

Retrieval: A re-ranking algorithm that does not support composite primary keys was used.

Error Description

More than one primary key is passed to a re-ranking algorithm that does not support composite primary keys.

Possible Causes

Only the RRF re-ranking algorithm supports composite primary keys.

Solution

  1. Ensure that the number of primary keys does not exceed the upper limit allowed by the algorithm.

  2. Modify the input data and try again.

1021201005 Retrieval: Empty string field

Error Message

Retrieval: There is a field with an empty string.

Error Description

Some input parameters are set to empty strings.

Possible Causes

Some input parameters are set to empty strings, which is invalid.

Solution

  1. Check the input parameter values and ensure that none of them are empty.

  2. Modify the input data and try again.

1021201006 Retrieval: Illegal filter input

Error Message

Retrieval: The filter input is invalid.

Error Description

The filter parameter is invalid.

Possible Causes

  1. Mandatory fields are left empty (no field and no fields; no value and no range; or no op).

  2. For the BETWEEN operation, the range is not defined.

  3. For the non-BETWEEN operation, the value is not defined.

Solution

  1. Check the filter parameter.

  2. Modify the input data and try again.

1021201007 Retrieval: Invalid recall field name

Error Message

Retrieval: There is invalid recall name in RecallCondition.

Error Description

The recallName fields in different RecallCondition entries are the same.

Possible Causes

The recallName fields in different RecallCondition entries are the same.

Solution

  1. Check the name of the recallName field in each RecallCondition and ensure that the value is valid.

  2. Change the field name according to the document and try again.

1021201008 Retrieval: Vector similarity threshold too high

Error Message

Retrieval: The vector similarity threshold in VectorQuery is higher than the tiered threshold in VectorRerankParameter.

Error Description

The similarity threshold in VectorQuery exceeds the tiered threshold in VectorRerankParameter.

Possible Causes

The input similarity threshold in VectorQuery is higher than the minimum tiered threshold in VectorRerankParameter.

Solution

  1. Check the parameter settings in VectorQuery and ensure that the parameter settings are within a proper range.

  2. Modify the similarity threshold and try again.

1021201009 Retrieval: RerankMethod parameters do not match the channel type

Error Message

Retrieval: RerankMethod parameters do not match the channel type.

Error Description

The values of the RerankMethod parameters do not match the channel type.

Possible Causes

The input parameters do not match the channel type.

Solution

  1. Ensure that the input parameters match the channel type.

  2. If not, modify the parameter settings and try again.

1021201010 Retrieval: Empty parameter value

Error Message

Retrieval: There exists a parameter value that should not be empty but is actually not defined.

Error Description

The input parameter is empty.

Possible Causes

No valid parameter is passed during the API call.

Solution

  1. Check whether the input parameter is valid.

  2. If not, modify the parameter settings and try again.

1021200012 Unable to generate embeddings

Error Message

Unable to generate embeddings

Error Description

Loading the model failed.

Possible Causes

  1. The current version does not support automatic generation of query vectors. You need to import the vector array.

  2. Resources are insufficient.

Solution

Modify the parameter settings and try again.

1021400000 Internal Error

Error Message

Internal error.

Error Description

Internal error.

Possible Causes

  1. View the error log to determine the cause of the error. Possible causes include the following:

  2. The API execution is abnormal.

  3. Abnormal internal state.

  4. The API is incorrectly used.

  5. A system error, such as null pointer, unexpected restart of the data service, I/O error, or JS engine exception, occurs.

  6. A database error occurred.

Solution

  1. Check whether the APIs are called correctly. If not, apply necessary corrections.

  2. If the problem persists, ask the user to restart or update the app or upgrade the device version.

1021400001 Knowledge Source Not Configured

Error Message

The knowledge source is not configured.

Error Description

The rdbSource parameter is not set in the knowledge source configuration.

Possible Causes

The rdbSource parameter is not set in the knowledge source configuration.

Solution

Set the rdbSource field correctly by referring to Knowledge Source Configuration.

1021400002 Knowledge Schema File Does Not Exist

Error Message

The knowledge schema file is not found.

Error Description

The knowledge schema file does not exist.

Possible Causes

The knowledge schema file is not stored in the specified directory.

Solution

Place the knowledge_schema.json file in the specified entry/src/main/resources/rawfile/arkdata/knowledge directory. For details, see Knowledge Schema Configuration Examples.

1021400003 Invalid Knowledge Schema Content

Error Message

The knowledge schema content is invalid.

Error Description

The knowledge schema content is invalid.

Possible Causes

The knowledge schema content does not meet the constraints.

Solution

Modify the content by referring to Knowledge Schema Specifications and Constraints.

1021400004 Error Occurred When Operating the RDB Data Source

Error Message

An error occurred during operations on the RDB source.

Error Description

An error occurred when operating the RDB data source.

Possible Causes

An RDB data source exception occurred.

Solution

If the problem persists, ask the user to restart or update the app or upgrade the device version.

1021400005 Knowledge Processing Already Started

Error Message

Feature already active. Function called repeatedly.

Error Description

The knowledge processing task is already started.

Possible Causes

The API is called repeatedly to start knowledge processing.

Solution

After knowledge processing is started, do not call the API repeatedly.

1021900001 Calling On-Device Q&A Model Timed Out

Error Message

A timeout occurs when the local chat model is called.

Error Description

Calling the on-device Q&A model timed out.

Possible Causes

  1. The question is too long, causing the on-device Q&A model to take too long to process.

  2. The system is busy, and hardware resources are insufficient. Therefore, the on-device Q&A model takes too long to process.

Solution

  1. Try to shorten the question.

  2. Close the processes with low priority in the background and try again later.

1021900002 Loading the On-Device Q&A Model Failed

Error Message

A loading failure occurs when the local chat model is called.

Error Description

The on-device Q&A model failed to be loaded when being called.

Possible Causes

  1. The model file is not downloaded from the PC model manager.

  2. The PC model manager service failed to be started.

Solution

  1. Download the model file from the PC model manager.

  2. Restart the app and try again.

1021900003 Requesting the On-Device Q&A Model Failed

Error Message

A request failure occurs when the local chat model is called.

Error Description

The request to the on-device Q&A model failed.

Possible Causes

An internal processing exception occurred.

Solution

Try again later.

1021900004 On-Device Q&A Model Busy

Error Message

The local chat model is busy.

Error Description

The on-device Q&A model is busy when being called.

Possible Causes

The on-device Q&A model is processing other tasks.

Solution

Close other Q&A requests with low priority and try again later.

1021900005 Some Parameters Do Not Meet Constraints

Error Message

Some parameters do not meet the specified constraints.

Error Description

Some parameters do not meet the constraints.

Possible Causes

The input parameters of the API do not meet the constraints.

Solution

Modify the input parameters according to the constraints and try again.