1e41f4b71Sopenharmony_ci# Application Event Logging Error Codes 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci> **NOTE** 4e41f4b71Sopenharmony_ci> 5e41f4b71Sopenharmony_ci> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md). 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ci## 11100001 Application Event Logging Disabled 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Error Message** 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciFunction disabled. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci**Description** 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci- The **write** API is called to perform application event logging, but the system ignores related events because the logging function is disabled. 16e41f4b71Sopenharmony_ci- The **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the logging function is disabled. 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci**Possible Causes** 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ciThe application event logging function is disabled. 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci**Solution** 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ciInvoke the **configure** API to enable the application event logging function. 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci ```ts 27e41f4b71Sopenharmony_ci import hiAppEvent from '@ohos.hiviewdfx.hiAppEvent'; 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci hiAppEvent.configure({ 30e41f4b71Sopenharmony_ci disable: false 31e41f4b71Sopenharmony_ci }); 32e41f4b71Sopenharmony_ci ``` 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci## 11101001 Invalid Event Domain Name 35e41f4b71Sopenharmony_ci**Error Message** 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ciInvalid event domain. 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci**Description** 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci- The **write** API is called to perform application event logging, but the system ignores related events because the input event domain name is invalid. 42e41f4b71Sopenharmony_ci- The **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the input event domain name is invalid. 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci**Possible Causes** 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ciThe specified event domain name does not comply with the following rules: 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci- The event domain name contains only digits, letters, and underscores (\_). 49e41f4b71Sopenharmony_ci- The event domain name starts with a letter and does not end with an underscore (\_). 50e41f4b71Sopenharmony_ci- The event domain name is not empty and contains a maximum of 32 characters. 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ci**Solution** 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ciSpecify a valid event domain name. 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci## 11101002 Invalid Event Name 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci**Error Message** 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ciInvalid event name. 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ci**Description** 63e41f4b71Sopenharmony_ci 64e41f4b71Sopenharmony_ci- The **write** API is called to perform application event logging, but the system ignores related events because the input event name is invalid. 65e41f4b71Sopenharmony_ci- The **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the input event name is invalid. 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ci**Possible Causes** 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ciThe specified event name does not comply with the following rules: 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ci- The event name contains only the dollar sign ($), digits, letters, and underscores (_). 72e41f4b71Sopenharmony_ci- The event name must start with a letter or dollar sign ($) and end with a digit or letter. 73e41f4b71Sopenharmony_ci- The event name is not empty and contains a maximum of 48 characters. 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci**Solution** 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ciSpecify a valid event name. 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci## 11101003 Invalid Number of Event Parameters 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci**Error Message** 82e41f4b71Sopenharmony_ci 83e41f4b71Sopenharmony_ciInvalid number of event parameters. 84e41f4b71Sopenharmony_ci 85e41f4b71Sopenharmony_ci**Description** 86e41f4b71Sopenharmony_ci 87e41f4b71Sopenharmony_ciThis error code is reported if the **write** API is called to perform application event logging but the system discards extra event parameters because the number of input event parameters exceeds the limit. 88e41f4b71Sopenharmony_ci 89e41f4b71Sopenharmony_ci**Possible Causes** 90e41f4b71Sopenharmony_ci 91e41f4b71Sopenharmony_ciThe number of input event parameters exceeds 32. 92e41f4b71Sopenharmony_ci 93e41f4b71Sopenharmony_ci**Solution** 94e41f4b71Sopenharmony_ci 95e41f4b71Sopenharmony_ciSpecify a valid number of event parameters. 96e41f4b71Sopenharmony_ci 97e41f4b71Sopenharmony_ci## 11101004 Invalid Event Parameter String Length 98e41f4b71Sopenharmony_ci 99e41f4b71Sopenharmony_ci**Error Message** 100e41f4b71Sopenharmony_ci 101e41f4b71Sopenharmony_ciInvalid string length of the event parameter. 102e41f4b71Sopenharmony_ci 103e41f4b71Sopenharmony_ci**Description** 104e41f4b71Sopenharmony_ci 105e41f4b71Sopenharmony_ci- The **write** API is called to perform application event logging, but the system ignores related event parameters because the value of the input event parameter is excessively long. 106e41f4b71Sopenharmony_ci- The **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the input event parameter value is invalid. 107e41f4b71Sopenharmony_ci 108e41f4b71Sopenharmony_ci**Possible Causes** 109e41f4b71Sopenharmony_ci 110e41f4b71Sopenharmony_ci- The length of the string of the event parameter value passed by the **write** API exceeds 8 x 1024 characters. 111e41f4b71Sopenharmony_ci- The length of the custom event parameter value passed by the **setEventParam** API exceeds 1024 characters. 112e41f4b71Sopenharmony_ci 113e41f4b71Sopenharmony_ci**Solution** 114e41f4b71Sopenharmony_ci 115e41f4b71Sopenharmony_ciSpecify an event parameter value with a valid length. 116e41f4b71Sopenharmony_ci 117e41f4b71Sopenharmony_ci## 11101005 Invalid Event Parameter Name 118e41f4b71Sopenharmony_ci 119e41f4b71Sopenharmony_ci**Error Message** 120e41f4b71Sopenharmony_ci 121e41f4b71Sopenharmony_ciInvalid event parameter name. 122e41f4b71Sopenharmony_ci 123e41f4b71Sopenharmony_ci**Description** 124e41f4b71Sopenharmony_ci 125e41f4b71Sopenharmony_ci- The **write** API is called to perform application event logging but the system ignores related event parameters because the input event parameter name is invalid. 126e41f4b71Sopenharmony_ci- The **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the input event parameter name is invalid. 127e41f4b71Sopenharmony_ci 128e41f4b71Sopenharmony_ci**Possible Causes** 129e41f4b71Sopenharmony_ci 130e41f4b71Sopenharmony_ciThe specified event parameter name does not comply with the following rules: 131e41f4b71Sopenharmony_ci 132e41f4b71Sopenharmony_ci- The event parameter name contains only the dollar sign ($), digits, letters, and underscores (_). 133e41f4b71Sopenharmony_ci- The event parameter name must start with a letter or dollar sign ($) and end with a digit or letter. 134e41f4b71Sopenharmony_ci- The event parameter name is not empty and contains a maximum of 32 characters. 135e41f4b71Sopenharmony_ci 136e41f4b71Sopenharmony_ci**Solution** 137e41f4b71Sopenharmony_ci 138e41f4b71Sopenharmony_ciSpecify a valid event parameter name. 139e41f4b71Sopenharmony_ci 140e41f4b71Sopenharmony_ci## 11101006 Invalid Array Length of Event Parameter Values 141e41f4b71Sopenharmony_ci 142e41f4b71Sopenharmony_ci**Error Message** 143e41f4b71Sopenharmony_ci 144e41f4b71Sopenharmony_ciInvalid array length of the event parameter. 145e41f4b71Sopenharmony_ci 146e41f4b71Sopenharmony_ci**Description** 147e41f4b71Sopenharmony_ci 148e41f4b71Sopenharmony_ciThis error code is reported if the **write** API is called to perform application event logging but the system discards extra array elements because the array of the event parameter value is excessively long. 149e41f4b71Sopenharmony_ci 150e41f4b71Sopenharmony_ci**Possible Causes** 151e41f4b71Sopenharmony_ci 152e41f4b71Sopenharmony_ciThe array length of the event parameter value exceeds 100. 153e41f4b71Sopenharmony_ci 154e41f4b71Sopenharmony_ci**Solution** 155e41f4b71Sopenharmony_ci 156e41f4b71Sopenharmony_ciSpecify a valid array length for the event parameter value. 157e41f4b71Sopenharmony_ci 158e41f4b71Sopenharmony_ci## 11101007 Invalid Number of Custom Event Parameters 159e41f4b71Sopenharmony_ci 160e41f4b71Sopenharmony_ci**Error Message** 161e41f4b71Sopenharmony_ci 162e41f4b71Sopenharmony_ciThe number of parameter keys exceeds the limit. 163e41f4b71Sopenharmony_ci 164e41f4b71Sopenharmony_ci**Description** 165e41f4b71Sopenharmony_ci 166e41f4b71Sopenharmony_ciThe **setEventParam** API is called to set custom event parameters, but the system ignores the calling because the number of event parameters is invalid. 167e41f4b71Sopenharmony_ci 168e41f4b71Sopenharmony_ci**Possible Causes** 169e41f4b71Sopenharmony_ci 170e41f4b71Sopenharmony_ciThe number of custom event parameters passed exceeds 64. 171e41f4b71Sopenharmony_ci 172e41f4b71Sopenharmony_ci**Solution** 173e41f4b71Sopenharmony_ci 174e41f4b71Sopenharmony_ciSpecify a valid number of custom event parameters. 175e41f4b71Sopenharmony_ci 176e41f4b71Sopenharmony_ci## 11102001 Invalid Watcher Name 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci**Error Message** 179e41f4b71Sopenharmony_ci 180e41f4b71Sopenharmony_ciInvalid watcher name. 181e41f4b71Sopenharmony_ci 182e41f4b71Sopenharmony_ci**Description** 183e41f4b71Sopenharmony_ci 184e41f4b71Sopenharmony_ciThis error code is reported if the **addWatcher** API is called to subscribe to application events but the system ignores the subscription because the specified watcher name is invalid. 185e41f4b71Sopenharmony_ci 186e41f4b71Sopenharmony_ci**Possible Causes** 187e41f4b71Sopenharmony_ci 188e41f4b71Sopenharmony_ciThe specified watcher name does not comply with the following rules: 189e41f4b71Sopenharmony_ci 190e41f4b71Sopenharmony_ci- The watcher name can contain only digits, letters, and underscores (\_). 191e41f4b71Sopenharmony_ci- The watcher name starts with a letter and does not end with an underscore (\_). 192e41f4b71Sopenharmony_ci- The watcher name is not empty and contains a maximum of 32 characters. 193e41f4b71Sopenharmony_ci 194e41f4b71Sopenharmony_ci**Solution** 195e41f4b71Sopenharmony_ci 196e41f4b71Sopenharmony_ciSpecify a valid watcher name. 197e41f4b71Sopenharmony_ci 198e41f4b71Sopenharmony_ci## 11102002 Invalid Filtering Event Domain Name 199e41f4b71Sopenharmony_ci 200e41f4b71Sopenharmony_ci**Error Message** 201e41f4b71Sopenharmony_ci 202e41f4b71Sopenharmony_ciInvalid filtering event domain. 203e41f4b71Sopenharmony_ci 204e41f4b71Sopenharmony_ci**Description** 205e41f4b71Sopenharmony_ci 206e41f4b71Sopenharmony_ciThis error code is reported if the **addWatcher** API is called to subscribe to application events but the system ignores the subscription because the specified filtering event domain name is invalid. 207e41f4b71Sopenharmony_ci 208e41f4b71Sopenharmony_ci**Possible Causes** 209e41f4b71Sopenharmony_ci 210e41f4b71Sopenharmony_ciThe specified filtering event domain name does not comply with the following rules: 211e41f4b71Sopenharmony_ci 212e41f4b71Sopenharmony_ci- The event domain name contains only digits, letters, and underscores (\_). 213e41f4b71Sopenharmony_ci- The event domain name starts with a letter and does not end with an underscore (\_). 214e41f4b71Sopenharmony_ci- The event domain name is not empty and contains a maximum of 32 characters. 215e41f4b71Sopenharmony_ci 216e41f4b71Sopenharmony_ci**Solution** 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ciSpecify a valid filtering event domain name. 219e41f4b71Sopenharmony_ci 220e41f4b71Sopenharmony_ci## 11102003 Invalid Event Number 221e41f4b71Sopenharmony_ci 222e41f4b71Sopenharmony_ci**Error Message** 223e41f4b71Sopenharmony_ci 224e41f4b71Sopenharmony_ciInvalid row value. 225e41f4b71Sopenharmony_ci 226e41f4b71Sopenharmony_ci**Description** 227e41f4b71Sopenharmony_ci 228e41f4b71Sopenharmony_ciThis error code is reported if the **addWatcher** API is called to subscribe to application events but the system ignores the subscription because an invalid event number is passed in the callback trigger condition. 229e41f4b71Sopenharmony_ci 230e41f4b71Sopenharmony_ci**Possible Causes** 231e41f4b71Sopenharmony_ci 232e41f4b71Sopenharmony_ciThe event number passed in the input callback triggering condition is a negative number. 233e41f4b71Sopenharmony_ci 234e41f4b71Sopenharmony_ci**Solution** 235e41f4b71Sopenharmony_ci 236e41f4b71Sopenharmony_ciSpecify a valid event number. 237e41f4b71Sopenharmony_ci 238e41f4b71Sopenharmony_ci## 11102004 Invalid Event Size 239e41f4b71Sopenharmony_ci 240e41f4b71Sopenharmony_ci**Error Message** 241e41f4b71Sopenharmony_ci 242e41f4b71Sopenharmony_ciInvalid size value. 243e41f4b71Sopenharmony_ci 244e41f4b71Sopenharmony_ci**Description** 245e41f4b71Sopenharmony_ci 246e41f4b71Sopenharmony_ciThis error code is reported if the **addWatcher** API is called to subscribe to application events but the system ignores the subscription because an invalid event size is passed in the callback trigger condition. 247e41f4b71Sopenharmony_ci 248e41f4b71Sopenharmony_ci**Possible Causes** 249e41f4b71Sopenharmony_ci 250e41f4b71Sopenharmony_ciThe event size passed in the input callback triggering condition is a negative number. 251e41f4b71Sopenharmony_ci 252e41f4b71Sopenharmony_ci**Solution** 253e41f4b71Sopenharmony_ci 254e41f4b71Sopenharmony_ciSpecify a valid event size. 255e41f4b71Sopenharmony_ci 256e41f4b71Sopenharmony_ci## 11102005 Invalid Timeout Value 257e41f4b71Sopenharmony_ci 258e41f4b71Sopenharmony_ci**Error Message** 259e41f4b71Sopenharmony_ci 260e41f4b71Sopenharmony_ciInvalid timeout value. 261e41f4b71Sopenharmony_ci 262e41f4b71Sopenharmony_ci**Description** 263e41f4b71Sopenharmony_ci 264e41f4b71Sopenharmony_ciThis error code is reported if the **addWatcher** API is called to subscribe to application events but the system ignores the subscription because an invalid timeout value is passed in the callback trigger condition. 265e41f4b71Sopenharmony_ci 266e41f4b71Sopenharmony_ci**Possible Causes** 267e41f4b71Sopenharmony_ci 268e41f4b71Sopenharmony_ciThe timeout value passed in the input callback triggering condition is a negative number. 269e41f4b71Sopenharmony_ci 270e41f4b71Sopenharmony_ci**Solution** 271e41f4b71Sopenharmony_ci 272e41f4b71Sopenharmony_ciSpecify a valid timeout value. 273e41f4b71Sopenharmony_ci 274e41f4b71Sopenharmony_ci## 11103001 Invalid Maximum Storage Quota 275e41f4b71Sopenharmony_ci 276e41f4b71Sopenharmony_ci**Error Message** 277e41f4b71Sopenharmony_ci 278e41f4b71Sopenharmony_ciInvalid max storage quota value. 279e41f4b71Sopenharmony_ci 280e41f4b71Sopenharmony_ci**Description** 281e41f4b71Sopenharmony_ci 282e41f4b71Sopenharmony_ciThis error code is reported if the **configure** API is called to subscribe to application events but the system ignores the setting because the specified maximum storage quota is invalid. 283e41f4b71Sopenharmony_ci 284e41f4b71Sopenharmony_ci**Possible Causes** 285e41f4b71Sopenharmony_ci 286e41f4b71Sopenharmony_ciThe maximum storage quota does not meet the following rules: 287e41f4b71Sopenharmony_ci 288e41f4b71Sopenharmony_ci- The quota value consists of only digits and a unit (including b|k|kb|m|mb|g|gb|t|tb, which are case-insensitive). 289e41f4b71Sopenharmony_ci- The quota value must start with a digit. You can determine whether to pass the unit. If the unit is left empty, **b** (that is, byte) is used by default. 290e41f4b71Sopenharmony_ci 291e41f4b71Sopenharmony_ci**Solution** 292e41f4b71Sopenharmony_ci 293e41f4b71Sopenharmony_ciSpecify a valid maximum storage quota. 294e41f4b71Sopenharmony_ci 295e41f4b71Sopenharmony_ci## 11104001 Invalid Event Package Size 296e41f4b71Sopenharmony_ci 297e41f4b71Sopenharmony_ci**Error Message** 298e41f4b71Sopenharmony_ci 299e41f4b71Sopenharmony_ciInvalid size value. 300e41f4b71Sopenharmony_ci 301e41f4b71Sopenharmony_ci**Description** 302e41f4b71Sopenharmony_ci 303e41f4b71Sopenharmony_ciThis error code is reported if the **setSize** API is called to set the threshold of the event package size but the system ignores the setting because the specified event package size is invalid. 304e41f4b71Sopenharmony_ci 305e41f4b71Sopenharmony_ci**Possible Causes** 306e41f4b71Sopenharmony_ci 307e41f4b71Sopenharmony_ciThe specified event package size is a negative number. 308e41f4b71Sopenharmony_ci 309e41f4b71Sopenharmony_ci**Solution** 310e41f4b71Sopenharmony_ci 311e41f4b71Sopenharmony_ciSpecify a valid event package size. 312