1 /* 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OS_ACCOUNT_FRAMEWORKS_COMMON_ACCOUNT_ERROR_INCLUDE_ACCOUNT_ERROR_NO_H 17 #define OS_ACCOUNT_FRAMEWORKS_COMMON_ACCOUNT_ERROR_INCLUDE_ACCOUNT_ERROR_NO_H 18 19 #include <cstdint> 20 #include "errors.h" 21 22 namespace OHOS { 23 enum { 24 ACCOUNT_MODULE_COMMON = 0x00, 25 ACCOUNT_MODULE_ACCOUNTMGR, 26 ACCOUNT_MODULE_DATADEAL, 27 ACCOUNT_MODULE_IACCOUNT, 28 ACCOUNT_MODULE_APPACCOUNT_KIT, 29 ACCOUNT_MODULE_APPACCOUNT_SERVICE, 30 ACCOUNT_MODULE_OSACCOUNT_KIT, 31 ACCOUNT_MODULE_OSACCOUNT_SERVICE, 32 ACCOUNT_MODULE_ACCOUNT_IAM_KIT, 33 ACCOUNT_MODULE_OHOSACCOUNT_SERVICE, 34 ACCOUNT_MODULE_DOMAIN_ACCOUNT_SERVICE, 35 ACCOUNT_MODULE_OHOSACCOUNT_KIT 36 }; 37 38 // Error code for common 39 constexpr ErrCode ACCOUNT_COMMON_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_COMMON); 40 enum { 41 ERR_ACCOUNT_COMMON_NOT_INIT_ERROR = ACCOUNT_COMMON_ERR_OFFSET + 0x0001, 42 ERR_ACCOUNT_COMMON_NOT_SYSTEM_APP_ERROR, 43 ERR_ACCOUNT_COMMON_DUMP_JSON_ERROR, 44 ERR_ACCOUNT_COMMON_INSUFFICIENT_MEMORY_ERROR, 45 ERR_ACCOUNT_COMMON_NULL_PTR_ERROR, 46 ERR_ACCOUNT_COMMON_WRITE_DESCRIPTOR_ERROR, 47 ERR_ACCOUNT_COMMON_CHECK_DESCRIPTOR_ERROR, 48 ERR_ACCOUNT_COMMON_PERMISSION_DENIED, 49 ERR_ACCOUNT_COMMON_CHECK_KVSTORE_ERROR, 50 ERR_ACCOUNT_COMMON_DELETE_KEY_FROM_KVSTORE_ERROR, 51 ERR_ACCOUNT_COMMON_BAD_JSON_FORMAT_ERROR, 52 ERR_ACCOUNT_COMMON_CONNECT_ABILITY_MANAGER_SERVICE_ERROR, 53 ERR_ACCOUNT_COMMON_INTERFACE_NOT_SUPPORT_ERROR, 54 ERR_ACCOUNT_COMMON_CONNECT_BUNDLE_MANAGER_SERVICE_ERROR, 55 ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY_MANAGER, 56 ERR_ACCOUNT_COMMON_GET_SYSTEM_ABILITY, 57 ERR_ACCOUNT_COMMON_GET_PROXY, 58 ERR_ACCOUNT_COMMON_CREATE_DEATH_RECIPIENT, 59 ERR_ACCOUNT_COMMON_ADD_DEATH_RECIPIENT, 60 ERR_ACCOUNT_COMMON_WRITE_PARCEL_ERROR, 61 ERR_ACCOUNT_COMMON_READ_PARCEL_ERROR, 62 ERR_ACCOUNT_COMMON_INVALID_PARAMETER, 63 ERR_ACCOUNT_COMMON_POST_TASK, 64 ERR_ACCOUNT_COMMON_FILE_OPEN_FAILED, 65 ERR_ACCOUNT_COMMON_FILE_WRITE_FAILED, 66 ERR_ACCOUNT_COMMON_FILE_READ_FAILED, 67 ERR_ACCOUNT_COMMON_ACCOUNT_NOT_EXIST_ERROR, 68 ERR_ACCOUNT_COMMON_OPERATION_TIMEOUT, 69 ERR_ACCOUNT_COMMON_NOT_AUTHENTICATED, 70 ERR_ACCOUNT_COMMON_NAME_HAD_EXISTED, 71 ERR_ACCOUNT_COMMON_SHORT_NAME_HAD_EXISTED, 72 ERR_ACCOUNT_COMMON_DISPLAY_ID_NOT_EXIST_ERROR, 73 ERR_ACCOUNT_COMMON_ACCOUNT_IN_DISPLAY_ID_NOT_FOUND_ERROR, 74 ERR_ACCOUNT_COMMON_ACCOUNT_SUBSCRIBE_NOT_FOUND_ERROR 75 }; 76 77 // Error code for AccountMgr 78 constexpr ErrCode ACCOUNT_ACCOUNTMGR_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_ACCOUNTMGR); 79 enum { 80 ERR_ACCOUNT_MGR_DUMP_ERROR = ACCOUNT_ACCOUNTMGR_ERR_OFFSET + 0x0001, 81 ERR_ACCOUNT_MGR_GET_REMOTE_SA_ERROR, 82 ERR_ACCOUNT_MGR_CONNECT_SA_ERROR, 83 ERR_ACCOUNT_MGR_ADD_TO_SA_ERROR, 84 ERR_ACCOUNT_MGR_OHOS_MGR_INIT_ERROR 85 }; 86 87 // Error code for DataDeal module 88 constexpr ErrCode ACCOUNT_DATADEAL_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_DATADEAL); 89 enum { 90 ERR_ACCOUNT_DATADEAL_INPUT_FILE_ERROR = ACCOUNT_DATADEAL_ERR_OFFSET + 0x0001, 91 ERR_ACCOUNT_DATADEAL_NOT_READY, 92 ERR_ACCOUNT_DATADEAL_JSON_FILE_CORRUPTION 93 }; 94 95 // Error code for IAccount 96 constexpr ErrCode ACCOUNT_IACCOUNT_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_IACCOUNT); 97 enum { 98 ERR_ACCOUNT_ZIDL_ACCOUNT_STUB_ERROR = ACCOUNT_IACCOUNT_ERR_OFFSET + 0x0001, 99 ERR_ACCOUNT_ZIDL_ACCOUNT_SERVICE_ERROR, 100 ERR_ACCOUNT_ZIDL_MGR_NOT_READY_ERROR, 101 ERR_ACCOUNT_ZIDL_ACCOUNT_STUB_USERID_ERROR 102 }; 103 104 // Error code for APPACCOUNT_KIT 105 constexpr ErrCode APPACCOUNT_KIT_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_APPACCOUNT_KIT); 106 enum { 107 // AppAccount::GetAppAccountProxy 4456449 108 ERR_APPACCOUNT_KIT_GET_APP_ACCOUNT_SERVICE = APPACCOUNT_KIT_ERR_OFFSET + 0x0001, 109 ERR_APPACCOUNT_KIT_CREATE_APP_ACCOUNT_DEATH_RECIPIENT, 110 // AppAccount 4456455 111 ERR_APPACCOUNT_KIT_SUBSCRIBER_IS_NULLPTR, 112 ERR_APPACCOUNT_KIT_GET_SUBSCRIBE_INFO, 113 ERR_APPACCOUNT_KIT_GET_OWNERS, 114 ERR_APPACCOUNT_KIT_SET_OWNERS, 115 ERR_APPACCOUNT_KIT_SUBSCRIBE, 116 ERR_APPACCOUNT_KIT_NO_SPECIFIED_SUBSCRIBER_HAS_BEEN_REGISTERED, 117 // AppAccountProxy & AppAccountEventProxy 4456480 118 ERR_APPACCOUNT_KIT_SEND_REQUEST, 119 ERR_APPACCOUNT_KIT_READ_PARCELABLE_APP_ACCOUNT_INFO, 120 // AppAccountStub 4456503 121 ERR_APPACCOUNT_KIT_READ_PARCELABLE_VECTOR_ACCOUNT_INFO, 122 }; 123 124 // Error code for APPACCOUNT_SERVICE 125 constexpr ErrCode APPACCOUNT_SERVICE_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_APPACCOUNT_SERVICE); 126 enum { 127 // 4521985 128 ERR_APPACCOUNT_SERVICE_ACCOUNT_NOT_EXIST = APPACCOUNT_SERVICE_ERR_OFFSET + 0x0001, 129 // InnerAppAccountManager 4521995 130 ERR_APPACCOUNT_SERVICE_DATA_STORAGE_PTR_IS_NULLPTR, 131 ERR_APPACCOUNT_SERVICE_ACCOUNT_MAX_SIZE, 132 ERR_APPACCOUNT_SERVICE_GET_ACCOUNT_INFO_BY_ID, 133 ERR_APPACCOUNT_SERVICE_GET_ASSOCIATED_DATA, 134 ERR_APPACCOUNT_SERVICE_SET_ASSOCIATED_DATA, 135 ERR_APPACCOUNT_SERVICE_ACCOUNT_CREDENTIAL_NOT_EXIST, 136 ERR_APPACCOUNT_SERVICE_GET_OWNER, 137 ERR_APPACCOUNT_SERVICE_GET_BUNDLE_NAME, 138 ERR_APPACCOUNT_SERVICE_GET_APP_INDEX, 139 ERR_APPACCOUNT_SERVICE_GET_BUNDLE_INFO, 140 ERR_APPACCOUNT_SERVICE_ADD_EXISTING_ACCOUNT, 141 ERR_APPACCOUNT_SERVICE_ENABLE_APP_ACCESS_ALREADY_EXISTS, 142 ERR_APPACCOUNT_SERVICE_DISABLE_APP_ACCESS_NOT_EXISTED, 143 ERR_APPACCOUNT_SERVICE_ASSOCIATED_DATA_KEY_NOT_EXIST, 144 ERR_APPACCOUNT_SERVICE_ASSOCIATED_DATA_OVER_SIZE, 145 // AppAccountOAuth 146 ERR_APPACCOUNT_SERVICE_OAUTH_TOKEN_NOT_EXIST, 147 ERR_APPACCOUNT_SERVICE_OAUTH_TYPE_NOT_EXIST, 148 ERR_APPACCOUNT_SERVICE_OAUTH_TOKEN_MAX_SIZE, 149 ERR_APPACCOUNT_SERVICE_OAUTH_LIST_MAX_SIZE, 150 ERR_APPACCOUNT_SERVICE_OAUTH_AUTHENTICATOR_NOT_EXIST, 151 ERR_APPACCOUNT_SERVICE_OAUTH_AUTHENTICATOR_CALLBACK_NOT_EXIST, 152 ERR_APPACCOUNT_SERVICE_OAUTH_SESSION_NOT_EXIST, 153 ERR_APPACCOUNT_SERVICE_OAUTH_BUSY, 154 ERR_APPACCOUNT_SERVICE_OAUTH_INVALID_RESPONSE, 155 ERR_APPACCOUNT_SERVICE_OAUTH_SERVICE_EXCEPTION, 156 // AppAccountSubscribeManager 4522034 157 ERR_APPACCOUNT_SERVICE_OWNERS_SIZE_IS_ZERO, 158 ERR_APPACCOUNT_SUBSCRIBER_ALREADY_REGISTERED, 159 ERR_APPACCOUNT_SERVICE_OTHER, 160 }; 161 162 // Error code for OSACCOUNT_KIT 163 constexpr ErrCode ACCOUNT_OSACCOUNT_KIT_ERR_OFFSET = ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_OSACCOUNT_KIT); 164 enum { 165 ERR_OSACCOUNT_KIT_CREATE_OS_ACCOUNT_FOR_DOMAIN_ERROR = ACCOUNT_OSACCOUNT_KIT_ERR_OFFSET + 0x0001, 166 ERR_OSACCOUNT_KIT_READ_LOCALNAME_ERROR, 167 ERR_OSACCOUNT_KIT_READ_IN_LOCAL_ID_ERROR, 168 ERR_OSACCOUNT_KIT_GET_APP_ACCOUNT_SERVICE_ERROR, 169 ERR_OSACCOUNT_KIT_CREATE_APP_ACCOUNT_DEATH_RECIPIENT_ERROR, 170 ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_ACTIVED_ERROR, 171 ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_CONSTRAINT_ENABLE_ERROR, 172 ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_VERIFIED_ERROR, 173 ERR_OSACCOUNT_KIT_GET_CREATED_OS_ACCOUNT_COUNT_ERROR, 174 ERR_OSACCOUNT_KIT_GET_OS_ACCOUNT_ALL_CONSTRAINTS_ERROR, 175 ERR_OSACCOUNT_KIT_QUERY_CURRENT_OS_ACCOUNT_ERROR, 176 ERR_OSACCOUNT_KIT_READ_CONSTRAINTS_ERROR, 177 ERR_OSACCOUNT_KIT_GET_DISTRIBUTED_VIRTUAL_DEVICE_ID_ERROR, 178 ERR_OSACCOUNT_KIT_SUBSCRIBE_ERROR, 179 ERR_OSACCOUNT_KIT_NO_SPECIFIED_SUBSCRIBER_HAS_BEEN_REGISTERED, 180 }; 181 182 // Error code for OSACCOUNT_SERVICE 183 constexpr ErrCode ACCOUNT_OSACCOUNT_SERVICE_ERR_OFFSET = 184 ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_OSACCOUNT_SERVICE); 185 enum { 186 // 4653057 187 ERR_OSACCOUNT_SERVICE_MANAGER_QUERY_DISTRIBUTE_DATA_ERROR = ACCOUNT_OSACCOUNT_SERVICE_ERR_OFFSET + 0x0001, 188 ERR_OSACCOUNT_SERVICE_MANAGER_NOT_ENABLE_MULTI_ERROR, 189 ERR_OSACCOUNT_SERVICE_MANAGER_ID_ERROR, 190 ERR_OSACCOUNT_SERVICE_MANAGER_CREATE_OSACCOUNT_TYPE_ERROR, 191 // 4653067 192 ERR_OSACCOUNT_SERVICE_INNER_SELECT_ERROR, 193 ERR_OSACCOUNT_SERVICE_INNER_UPDATE_ACCOUNT_ERROR, 194 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_IS_UNVERIFIED_ERROR, 195 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_IS_UNCOMPLETED_ERROR, 196 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_ALREADY_ACTIVE_ERROR, 197 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_STOP_ACTIVE_ERROR, 198 ERR_OSACCOUNT_SERVICE_INNER_REMOVE_ACCOUNT_ACTIVED_ERROR, 199 ERR_OSACCOUNT_SERVICE_INNER_DOMAIN_ALREADY_BIND_ERROR, 200 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_TO_BE_REMOVED_ERROR, 201 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_PLUGIN_NOT_EXIST_ERROR, 202 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_PLUGIN_NOT_ALLOWED_CREATION_ERROR, 203 // 4653108 204 ERR_OSACCOUNT_SERVICE_CONTROL_GET_TYPE_ERROR, 205 ERR_OSACCOUNT_SERVICE_CONTROL_INSERT_FILE_EXISTS_ERROR, 206 ERR_OSACCOUNT_SERVICE_CONTROL_UPDATE_FILE_NOT_EXISTS_ERROR, 207 ERR_OSACCOUNT_SERVICE_CONTROL_MAX_CAN_CREATE_ERROR, 208 ERR_OSACCOUNT_SERVICE_LOGGED_IN_ACCOUNTS_OVERSIZE, 209 ERR_OSACCOUNT_SERVICE_CONTROL_SELECT_CAN_USE_ID_ERROR, 210 ERR_OSACCOUNT_SERVICE_CONTROL_ID_CANNOT_CREATE_ERROR, 211 ERR_OSACCOUNT_SERVICE_CONTROL_CANNOT_DELETE_ID_ERROR, 212 // 4653131 213 ERR_OSACCOUNT_SERVICE_FILE_DELE_ERROR, 214 ERR_OSACCOUNT_SERVICE_FILE_FIND_FILE_ERROR, 215 ERR_OSACCOUNT_SERVICE_FILE_CREATE_DIR_ERROR, 216 ERR_OSACCOUNT_SERVICE_FILE_CHANGE_DIR_MODE_ERROR, 217 ERR_OSACCOUNT_SERVICE_DATA_STORAGE_KEY_NOT_EXISTS_ERROR, 218 ERR_OSACCOUNT_SERVICE_DATA_STORAGE_KEY_EXISTED_ERROR, 219 ERR_OSACCOUNT_SERVICE_ACCOUNT_INFO_EMPTY_ERROR, 220 // 4653142 221 ERR_OSACCOUNT_SERVICE_INTERFACE_TO_AM_ACCOUNT_START_ERROR, 222 ERR_OSACCOUNT_SERVICE_INTERFACE_TO_BM_ACCOUNT_CREATE_ERROR, 223 ERR_OSACCOUNT_SERVICE_INTERFACE_TO_BM_ACCOUNT_DELETE_ERROR, 224 ERR_OSACCOUNT_SERVICE_OS_FILE_GET_CONFIG_ERROR, 225 ERR_OSACCOUNT_SERVICE_OS_FILE_GET_CONSTRAINTS_LITS_ERROR, 226 ERR_OSACCOUNT_SERVICE_INNER_ACCOUNT_OPERATING_ERROR, 227 ERR_OSACCOUNT_SERVICE_GET_DATA_FROM_BASE_CONSTRAINTS_FILE_EMPTY, 228 ERR_OSACCOUNT_SERVICE_GET_DATA_FROM_GLOBAL_CONSTRAINTS_FILE_EMPTY, 229 ERR_OSACCOUNT_SERVICE_GET_DATA_FROM_SPECIFIC_CONSTRAINTS_FILE_EMPTY, 230 ERR_OSACCOUNT_SERVICE_STORAGE_PREPARE_ADD_USER_FAILED, 231 }; 232 233 // Error code for ACCOUNT_IAM_KIT 234 constexpr ErrCode ACCOUNT_IAM_KIT_ERR_OFFSET = 235 ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_ACCOUNT_IAM_KIT); 236 enum { 237 ERR_ACCOUNT_IAM_KIT_INPUTER_ALREADY_REGISTERED = ACCOUNT_IAM_KIT_ERR_OFFSET + 0x0001, 238 ERR_ACCOUNT_IAM_KIT_INPUTER_NOT_REGISTERED, 239 ERR_ACCOUNT_IAM_KIT_GET_USERID_FAIL, 240 ERR_ACCOUNT_IAM_UNSUPPORTED_AUTH_TYPE 241 }; 242 243 // Error code for OHOSACCOUNT_SERVICE 244 constexpr ErrCode ACCOUNT_OHOSACCOUNT_SERVICE_ERR_OFFSET = 245 ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_OHOSACCOUNT_SERVICE); 246 enum { 247 ERR_OHOSACCOUNT_SERVICE_FILE_CHANGE_DIR_MODE_ERROR = ACCOUNT_OHOSACCOUNT_SERVICE_ERR_OFFSET + 0x0001, 248 }; 249 250 // Error code for DOMAIN_ACCOUNT_SERVICE 251 constexpr ErrCode DOMAIN_ACCOUNT_ERR_OFFSET = 252 ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_DOMAIN_ACCOUNT_SERVICE); 253 enum { 254 ERR_DOMAIN_ACCOUNT_SERVICE_PLUGIN_ALREADY_EXIST = DOMAIN_ACCOUNT_ERR_OFFSET + 0x0001, 255 ERR_DOMAIN_ACCOUNT_SERVICE_PLUGIN_NOT_EXIST, 256 ERR_DOMAIN_ACCOUNT_SERVICE_NOT_DOMAIN_ACCOUNT, 257 ERR_DOMAIN_ACCOUNT_SERVICE_LISTENER_NOT_EXIT, 258 ERR_DOMAIN_ACCOUNT_SERVICE_INVALID_CALLING_UID, 259 ERR_DOMAIN_ACCOUNT_SERVICE_ERR_CODE_LIMIT, 260 }; 261 262 // Error code for OHOSACCOUNT_KIT 263 constexpr ErrCode ACCOUNT_OHOSACCOUNT_KIT_ERR_OFFSET = 264 ErrCodeOffset(SUBSYS_ACCOUNT, ACCOUNT_MODULE_OHOSACCOUNT_KIT); 265 enum { 266 ERR_OHOSACCOUNT_KIT_NO_SPECIFIED_CALLBACK_HAS_BEEN_REGISTERED = ACCOUNT_OHOSACCOUNT_KIT_ERR_OFFSET + 0x0001, 267 ERR_OHOSACCOUNT_KIT_SUBSCRIBE_ERROR, 268 ERR_OHOSACCOUNT_KIT_SUBSCRIBE_MAX_SIZE_ERROR, 269 ERR_OHOSACCOUNT_KIT_CALLBACK_ALREADY_REGISTERED_ERROR, 270 }; 271 272 enum IAMResultCode : int32_t { 273 ERR_IAM_SUCCESS = 0, 274 ERR_IAM_FAIL = 1, 275 ERR_IAM_GENERAL_ERROR = 2, 276 ERR_IAM_CANCELED = 3, 277 ERR_IAM_TIMEOUT = 4, 278 ERR_IAM_TYPE_NOT_SUPPORT = 5, 279 ERR_IAM_TRUST_LEVEL_NOT_SUPPORT = 6, 280 ERR_IAM_BUSY = 7, 281 ERR_IAM_INVALID_PARAMETERS = 8, 282 ERR_IAM_LOCKED = 9, 283 ERR_IAM_NOT_ENROLLED = 10, 284 ERR_IAM_HARDWARE_NOT_SUPPORTED = 11, 285 ERR_IAM_PIN_IS_EXPIRED = 13, 286 ERR_IAM_COMPLEXITY_CHECK_FAILED = 14, 287 ERR_IAM_SYSTEM_ERROR_CODE_BEGIN = 1000, 288 ERR_IAM_IPC_ERROR = 1001, 289 ERR_IAM_INVALID_CONTEXT_ID = 1002, 290 ERR_IAM_READ_PARCEL_ERROR = 1003, 291 ERR_IAM_WRITE_PARCEL_ERROR = 1004, 292 ERR_IAM_CHECK_PERMISSION_FAILED = 1005, 293 ERR_IAM_INVALID_HDI_INTERFACE = 1006, 294 ERR_IAM_VENDOR_ERROR_CODE_BEGIN = 10000, 295 ERR_IAM_TOKEN_TIMEOUT = 10016, 296 ERR_IAM_TOKEN_AUTH_FAILED = 10017, 297 ERR_IAM_CREDENTIAL_NUMBER_REACH_LIMIT = 10018, 298 ERR_IAM_SESSION_TIMEOUT = 10019, 299 }; 300 301 enum JSErrorCode { 302 ERR_JS_SUCCESS = 0, 303 ERR_JS_PERMISSION_DENIED = 201, 304 ERR_JS_IS_NOT_SYSTEM_APP = 202, 305 ERR_JS_PARAMETER_ERROR = 401, 306 ERR_JS_CAPABILITY_NOT_SUPPORTED = 801, 307 ERR_JS_SYSTEM_SERVICE_EXCEPTION = 12300001, 308 ERR_JS_INVALID_PARAMETER = 12300002, 309 ERR_JS_ACCOUNT_NOT_FOUND = 12300003, 310 ERR_JS_ACCOUNT_ALREADY_EXIST = 12300004, 311 ERR_JS_MULTI_USER_NOT_SUPPORT = 12300005, 312 ERR_JS_ACCOUNT_TYPE_NOT_SUPPORT = 12300006, 313 ERR_JS_ACCOUNT_NUMBER_REACH_LIMIT = 12300007, 314 ERR_JS_ACCOUNT_RESTRICTED = 12300008, 315 ERR_JS_ACCOUNT_ALREADY_ACTIVATED = 12300009, 316 ERR_JS_ACCOUNT_SERVICE_BUSY = 12300010, 317 ERR_JS_LISTENER_ALREADY_REGISTERED = 12300011, 318 ERR_JS_LISTENER_NOT_REGISTERED = 12300012, 319 ERR_JS_PLUGIN_NETWORK_EXCEPTION = 12300013, 320 ERR_JS_ACCOUNT_NOT_AUTHENTICATED = 12300014, 321 ERR_JS_ACCOUNT_SHORT_NAME_ALREADY_EXIST = 12300015, 322 ERR_JS_ACCOUNT_LOGGED_IN_ACCOUNTS_OVERSIZE = 12300016, 323 324 ERR_JS_AUTH_CREDENTIAL_WRONG_ERROR = 12300101, 325 ERR_JS_CREDENTIAL_NOT_EXIST = 12300102, 326 ERR_JS_CREDENTIAL_INPUTER_ALREADY_EXIST = 12300103, 327 ERR_JS_CREDENTIAL_INPUTER_NOT_EXIST = 12300104, 328 ERR_JS_TRUST_LEVEL_NOT_SUPPORTED = 12300105, 329 ERR_JS_AUTH_TYPE_NOT_SUPPORTED = 12300106, 330 ERR_JS_AUTH_TYPE_NOT_FOUND = 12300107, 331 ERR_JS_SESSION_NOT_EXIST = 12300108, 332 ERR_JS_AUTH_CANCELLED = 12300109, 333 ERR_JS_AUTH_SERVICE_LOCKED = 12300110, 334 ERR_JS_AUTH_TIMEOUT = 12300111, 335 ERR_JS_AUTH_SERVICE_BUSY = 12300112, 336 ERR_JS_ACCOUNT_AUTHENTICATOR_NOT_EXIST = 12300113, 337 ERR_JS_ACCOUNT_AUTHENTICATOR_SERVICE_EXCEPTION = 12300114, 338 ERR_JS_CREDENTIAL_NUMBER_REACH_LIMIT = 12300115, 339 ERR_JS_COMPLEXITY_CHECK_FAILED = 12300116, 340 ERR_JS_PIN_IS_EXPIRED = 12300117, 341 ERR_JS_SESSION_TIMEOUT = 12300118, 342 343 ERR_JS_DOMAIN_PLUGIN_ALREADY_REGISTERED = 12300201, 344 345 ERR_JS_INVALID_CONTEXT_ID = 12300002, 346 347 ERR_JS_APPLICATION_NOT_EXIST = 12400001, 348 ERR_JS_CUSTOM_DATA_NOT_FOUND = 12400002, 349 ERR_JS_CUSTOM_DATA_NUMBER_REACH_LIMIT = 12400003, 350 ERR_JS_TOKEN_NUMBER_REACH_LIMIT = 12400004, 351 ERR_JS_AUTHORIZATION_LIST_TOO_LARGE = 12400005 352 }; 353 354 int32_t ConvertToJSErrCode(int32_t nativeErrCode); 355 } // namespace OHOS 356 357 #endif // OS_ACCOUNT_FRAMEWORKS_COMMON_ACCOUNT_ERROR_INCLUDE_ACCOUNT_ERROR_NO_H 358