Overview
When using CloudBase, you may encounter various errors. This section will introduce common error codes and how to resolve them.
General Errors
| Error Code | Description |
|---|---|
| SYS_ERR | System internal exception |
| SERVER_TIMEOUT | Service response timeout |
| INVALID_APPID | Invalid AppId (WeChat appId or Tencent Cloud appId) |
| INVALID_ACTION | Invalid API call name |
| EXCEED_REQUEST_SIZE_LIMIT | Request body size exceeds limit |
| EXCEED_RATELIMIT | Request frequency exceeds plan resource limit |
| INVALID_REQUEST_SOURCE | Invalid request source, please check WEB security domain configuration |
| INVALID_COMMON_PARAM | Request common parameter error |
| INVALID_PARAM | Request parameter error |
| SIGN_PARAM_INVALID | Invalid authentication parameters |
| LOGIN_MANNER_UNREGISTED | The login method being used has been disabled |
| APP_SIGN_EXPIRED | Mobile app signature expired |
| INVALID_APP_SIGN | Invalid mobile app signature or signature format error |
| INVALID_APP_ACCESS | Invalid mobile app access or mobile app version not found |
| CHECK_LOGIN_FAILED | Login state verification failed, access token expired (legacy) |
| ACCESS_TOKEN_EXPIRED | Access token has expired |
| REFRESH_TOKEN_EXPIRED | Refresh token has expired or does not exist |
| INVALID_REFRESH_TOKEN | Invalid refresh token |
| REFRESH_TOKEN_EXHAUSTED | Multi-point login count exceeds limit |
| INVALID_ENV | Invalid environment or environment not found |
| INVALID_ENV_STATUS | Invalid or unavailable environment status |
| INVALID_ENV_SOURCE | Invalid source for mini-program binding to CloudBase environment |
| RESOURCE_NOT_INITIAL | Cloud resources not initialized or unavailable |
| EXCEED_REQUEST_LIMIT | Request count exceeds limit or plan resources exhausted |
| EXCEED_CONCURRENT_REQUEST_LIMIT | Concurrent request limit exceeded |
| INVALID_OPERATION | Invalid operation, current state (resource, account, etc.) does not allow the corresponding operation |
| PERMISSION_DENIED | No operation permission |
| INVALID_THIRDAPP_STATUS | Abnormal status of bound third-party mini-program |
Authentication Errors
| Error Code | Description |
|---|---|
| AUTH_INVALID_CUSTOM_LOGIN_TICKET | Invalid custom login credential (format error, expired, verification failed, etc.) |
| AUTH_WX_OAUTH_FAILED | WeChat OAuth failed |
| AUTH_CUSTOM_USER_ID_HAS_BEEN_BOUND | CustomUserId has been bound to an account |
| AUTH_OPEN_ID_HAS_BEEN_BOUND | OpenId has been bound to an account |
| AUTH_UNION_ID_HAS_BEEN_BOUND | UnionId has been bound to an account |
| AUTH_EMAIL_HAS_BEEN_BOUND | Email has been bound to an account |
| INVALID_EMAIL_TOKEN | Email activation token expired or does not exist |
| AUTH_LOGIN_FAILED | Login failed |
Database Errors
| Error Code | Description |
|---|---|
| DATABASE_REQUEST_FAILED | Database request failed, general database error |
| DATABASE_INVALID_OPERRATOR | Unsupported operation or invalid database operator |
| DATABASE_PERMISSION_DENIED | No permission to operate database resources |
| DATABASE_COLLECTION_EXCEED_LIMIT | Database collection count exceeds limit |
| DATABASE_COLLECTION_NOT_EXIST | Operation collection does not exist |
| DATABASE_COLLECTION_ALREADY_EXIST | Collection already exists when creating |
| DATABASE_TIMEOUT | Database request timeout |
| DATABASE_TRANSACTION_FAIL | Database transaction request failed |
| DATABASE_TRANSACTION_CONFLICT | Conflict between database transactions |
| DATABASE_DUPLICATE_WRITE | Database write failed, duplicate index key (e.g., inserting data with same _id) |
Cloud Function Errors
| Error Code | Description |
|---|---|
| FUNCTIONS_EXECUTE_FAIL | Cloud function execution failed, general cloud function error |
| FUNCTIONS_TIME_LIMIT_EXCEEDED | Cloud function execution timeout |
| FUNCTIONS_MEMORY_LIMIT_EXCEEDED | Cloud function runtime memory limit exceeded |
| FUNCTION_NOT_FOUND | Cloud function not found |
Cloud Storage Errors
| Error Code | Description |
|---|---|
| STORAGE_REQUEST_FAIL | Cloud storage request failed, general cloud storage error |
| EXCEED_UPLOAD_MAXFILESIZE | Cloud storage upload file size exceeds limit |
| STORAGE_SIGN_PARAM_INVALID | Cloud storage file metadata parsing failed |
| STORAGE_EXCEED_AUTHORITY | Current user has no permission to operate cloud storage resources |
| STORAGE_FILE_NONEXIST | Cloud storage file does not exist |
| STORAGE_FILE_PATH_CONFLICT | Cloud storage file path conflict |
Note
DATABASE_REQUEST_FAILED, STORAGE_REQUEST_FAIL, and FUNCTIONS_EXECUTE_FAIL are general database, cloud storage request errors, and cloud function request errors respectively, with no special semantics. More detailed error codes with independent characteristic semantics will be refined in the future. Please avoid making special logic judgments based on these error codes.