Skip to main content

TCB Error Codes

When using TCB, you may encounter various errors. This section will introduce common error codes and how to troubleshoot them.

General Errors

Error CodeMeaning
SYS_ERRInternal System Exception
SERVER_TIMEOUTService Response Timeout
INVALID_APPIDInvalid AppId (WeChat appId or Tencent Cloud appId)
--
INVALID_ACTIONInvalid API name
EXCEED_REQUEST_SIZE_LIMITRequest packet size limit exceeded
EXCEED_RATELIMITRequest frequency exceeds the package resource limit.
INVALID_REQUEST_SOURCEInvalid request source. Please check the WEB security domain configuration.
INVALID_COMMON_PARAMRequest common parameters error
INVALID_PARAMInvalid request parameters
SIGN_PARAM_INVALIDInvalid authentication parameters
LOGIN_MANNER_UNREGISTEDThe login method used has been disabled.
APP_SIGN_EXPIREDMobile application signature expired
INVALID_APP_SIGNInvalid mobile application signature, signature format error.
INVALID_APP_ACCESSInvalid mobile application access, mobile application version not found
CHECK_LOGIN_FAILEDLogin status verification failed, access token expired (legacy)
ACCESS_TOKEN_EXPIREDaccess token has expired
REFRESH_TOKEN_EXPIREDrefresh token has expired or does not exist
INVALID_REFRESH_TOKENInvalid refresh token
REFRESH_TOKEN_EXHAUSTEDConcurrent logins exceeded the limit
INVALID_ENVInvalid environment or environment not found
INVALID_ENV_STATUSInvalid environment status, unavailable
INVALID_ENV_SOURCEInvalid binding source for Mini Program to TCB environment
RESOURCE_NOT_INITIALCloud resources not initialized, cloud resources unavailable
EXCEED_REQUEST_LIMITRequest count exceeded the limit, package resources depleted
EXCEED_CONCURRENT_REQUEST_LIMITConcurrent request limit exceeded
INVALID_OPERATIONInvalid operation. The current state (e.g., resources, account) does not permit this operation
PERMISSION_DENIEDOperation permission denied
INVALID_THIRDAPP_STATUSBound third-party mini program status abnormal

Login Authentication

Error CodeMeaning
AUTH_INVALID_CUSTOM_LOGIN_TICKETInvalid custom login ticket (format error, expired, verification failed, etc.)
AUTH_WX_OAUTH_FAILEDWeChat OAuth failed
AUTH_CUSTOM_USER_ID_HAS_BEEN_BOUNDCustomUserId has been bound to an account
AUTH_OPEN_ID_HAS_BEEN_BOUNDopenId has been bound to an account
AUTH_UNION_ID_HAS_BEEN_BOUNDunionId has been bound to an account
AUTH_EMAIL_HAS_BEEN_BOUNDemail has been bound to an account
INVALID_EMAIL_TOKENemail activation token expired or does not exist
AUTH_LOGIN_FAILEDLogin failed

Database

Error CodeMeaning
DATABASE_REQUEST_FAILEDDatabase request failed, a general database error
DATABASE_INVALID_OPERRATORUnsupported operation, invalid database operator
DATABASE_PERMISSION_DENIEDDatabase operation permission denied
DATABASE_COLLECTION_EXCEED_LIMITDatabase collection limit exceeded
DATABASE_COLLECTION_NOT_EXISTCollection does not exist
DATABASE_COLLECTION_ALREADY_EXISTCollection already exists
DATABASE_TIMEOUTDatabase request timeout
DATABASE_TRANSACTION_FAILDatabase transaction request failed
DATABASE_TRANSACTION_CONFLICTDatabase transaction conflict
DATABASE_DUPLICATE_WRITEWrite to database failed due to duplicate key (e.g., inserting data with the same _id)

Cloud Function

Error CodeMeaning
FUNCTIONS_EXECUTE_FAILCloud function execution failed (general error)
FUNCTIONS_TIME_LIMIT_EXCEEDEDCloud Function execution timeout
FUNCTIONS_MEMORY_LIMIT_EXCEEDEDCloud Function memory limit exceeded
FUNCTION_NOT_FOUNDCloud function not found

Cloud Storage

Error CodeMeaning
STORAGE_REQUEST_FAILCloud Storage request failed (general error)
EXCEED_UPLOAD_MAXFILESIZECloud Storage upload file size exceeded the limit
STORAGE_SIGN_PARAM_INVALIDCloud Storage file metadata parsing failed
STORAGE_EXCEED_AUTHORITYThe current user lacks permission to operate cloud storage resources. Please check Cloud Storage permission configuration
STORAGE_FILE_NONEXISTCloud Storage file not found
STORAGE_FILE_PATH_CONFLICTCloud Storage file path conflict
Note

`DATABASE_REQUEST_FAILED, STORAGE_REQUEST_FAIL, and FUNCTIONS_EXECUTE_FAIL are general database request error, cloud storage request error, and cloud function request error respectively, with no specific semantics. In the future, we will refine error codes with distinct characteristic semantics. Please avoid making special logical judgments based on these error codes.