未验证 提交 094a76bb 编写于 作者: O openharmony_ci 提交者: Gitee

!17221 Fix error code of notification & form

Merge pull request !17221 from xuzhihao/master
......@@ -31,7 +31,14 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -78,7 +85,14 @@ setFormNextRefreshTime(formId: string, minute: number): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501002 | The number of forms exceeds upper bound. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -118,7 +132,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -167,7 +187,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500060 | A service connection error happened, please try again later. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
| 16501001 | The ID of the form to be operated does not exist. |
| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -204,10 +230,12 @@ getFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): voi
| callback | AsyncCallback<Array<[formInfo.FormInfo](js-apis-app-form-formInfo.md)>> | 是 | 回调函数。返回查询到的卡片信息。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
......@@ -247,7 +275,10 @@ getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback<Array&l
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -297,7 +328,10 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.For
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -343,7 +377,11 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData,
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -395,7 +433,11 @@ requestPublishForm(want: Want, callback: AsyncCallback<string>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -451,7 +493,11 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData
| 错误码ID | 错误信息 |
| -------- | -------- |
| 401 | 调用接口入参错误。 |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
......@@ -494,6 +540,16 @@ isRequestPublishFormSupported(callback: AsyncCallback<boolean>): void
| ------ | ------ | ---- | ------- |
| callback | AsyncCallback<boolean> | 是 | 回调函数。返回是否支持发布一张卡片到使用方。|
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......@@ -548,6 +604,15 @@ isRequestPublishFormSupported(): Promise<boolean>
| :------------ | :---------------------------------- |
| Promise<boolean> | Promise对象。返回是否支持发布一张卡片到使用方。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 16500050 | An IPC connection error happened. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......
......@@ -37,6 +37,14 @@ publish(event: string, callback: AsyncCallback<void>): void
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1500004 | not System services. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
| 1500009 | error obtaining system parameters. |
**示例:**
```ts
......@@ -77,6 +85,14 @@ publish(event: string, options: CommonEventPublishData, callback: AsyncCallback<
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 1500004 | not System services. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
| 1500009 | error obtaining system parameters. |
**示例:**
```ts
......@@ -126,6 +142,15 @@ publishAsUser(event: string, userId: number, callback: AsyncCallback<void>): voi
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 202 | not system app. |
| 401 | The parameter check failed. |
| 1500004 | not System services. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
| 1500009 | error obtaining system parameters. |
**示例:**
```ts
......@@ -172,6 +197,15 @@ publishAsUser(event: string, userId: number, options: CommonEventPublishData, ca
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 202 | not system app. |
| 401 | The parameter check failed. |
| 1500004 | not System services. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
| 1500009 | error obtaining system parameters. |
**示例:**
......@@ -217,6 +251,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallbac
| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | 是 | 表示订阅信息。 |
| callback | AsyncCallback\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | 是 | 表示创建订阅者的回调方法。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
**示例:**
......@@ -265,6 +307,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo): Promise<CommonEventSu
| --------------------------------------------------------- | ---------------- |
| Promise\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | 返回订阅者对象。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
**示例:**
```ts
......@@ -300,6 +350,17 @@ subscribe(subscriber: CommonEventSubscriber, callback: AsyncCallback<CommonEvent
| subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | 是 | 表示订阅者对象。 |
| callback | AsyncCallback\<[CommonEventData](./js-apis-inner-commonEvent-commonEventData.md)> | 是 | 表示接收公共事件数据的回调函数。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 801 | capability not supported. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
**示例:**
```ts
......@@ -359,6 +420,17 @@ unsubscribe(subscriber: CommonEventSubscriber, callback?: AsyncCallback<void>):
| subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | 是 | 表示订阅者对象。 |
| callback | AsyncCallback\<void> | 否 | 表示取消订阅的回调方法。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 401 | The parameter check failed. |
| 801 | capability not supported. |
| 1500007 | error sending message to Common Event Service. |
| 1500008 | Common Event Service does not complete initialization. |
**示例:**
```ts
......@@ -430,6 +502,19 @@ removeStickyCommonEvent(event: string, callback: AsyncCallback<void>): void
| event | string | 是 | 表示被移除的粘性公共事件。 |
| callback | AsyncCallback\<void> | 是 | 表示移除粘性公共事件的回调方法。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | The application dose not have permission to call the interface. |
| 202 | not system app. |
| 401 | The parameter check failed. |
| 1500004 | not system service. |
| 1500007 | The message send error. |
| 1500008 | The CEMS error. |
**示例:**
......@@ -466,6 +551,19 @@ removeStickyCommonEvent(event: string): Promise<void>
| -------------- | ---------------------------- |
| Promise\<void> | 表示移除粘性公共事件的对象。 |
**错误码:**
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | The application dose not have permission to call the interface. |
| 202 | not system app. |
| 401 | The parameter check failed. |
| 1500004 | not system service. |
| 1500007 | The message send error. |
| 1500008 | The CEMS error. |
**示例:**
......
......@@ -41,6 +41,18 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void
**系统能力**:SystemCapability.Ability.Form
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -98,6 +110,18 @@ startAbility(want: Want): Promise&lt;void&gt;
| ------------ | ---------------------------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | -------- |
| 202 | The application is not a system application. |
| 401 | If the input parameter is not valid parameter. |
| 16500050 | An IPC connection error happened. |
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
```ts
......
......@@ -40,9 +40,13 @@ subscribe(subscriber: NotificationSubscriber, info: NotificationSubscribeInfo, c
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
| 1600012 | No memory space. |
**示例:**
......@@ -92,9 +96,13 @@ subscribe(subscriber: NotificationSubscriber, callback: AsyncCallback\<void\>):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
| 1600012 | No memory space. |
**示例:**
......@@ -142,9 +150,13 @@ subscribe(subscriber: NotificationSubscriber, info?: NotificationSubscribeInfo):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
| 1600012 | No memory space. |
**示例:**
......@@ -187,6 +199,9 @@ unsubscribe(subscriber: NotificationSubscriber, callback: AsyncCallback\<void\>)
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -234,6 +249,9 @@ unsubscribe(subscriber: NotificationSubscriber): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -279,6 +297,9 @@ remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveRea
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -334,6 +355,9 @@ remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveRea
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -382,6 +406,9 @@ remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback\<void\>):
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -428,6 +455,9 @@ remove(hashCode: string, reason: RemoveReason): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -468,6 +498,9 @@ removeAll(bundle: BundleOption, callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -513,6 +546,9 @@ removeAll(callback: AsyncCallback\<void\>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -555,6 +591,9 @@ removeAll(bundle?: BundleOption): Promise\<void\>
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -594,6 +633,9 @@ removeAll(userId: number, callback: AsyncCallback\<void>): void
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......@@ -639,6 +681,9 @@ removeAll(userId: number): Promise\<void>
| 错误码ID | 错误信息 |
| -------- | ----------------------------------- |
| 201 | Permission denied. |
| 202 | Not system application to call the interface. |
| 401 | The parameter check failed. |
| 1600001 | Internal error. |
| 1600002 | Marshalling or unmarshalling error. |
| 1600003 | Failed to connect service. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册