Response
Description
info
General parameter description for uni-app and JS SDK Promise function callbacks.
- uni-app
- Browser/Electron/MiniProgram
- React-Native
CatchResponse
Type
type CatchResponse = {
errCode: number;
errMsg: string;
};
Field Description
| Field Name | Field Type | Description |
|---|---|---|
| errCode | number | Error code when call fails |
| errMsg | string | Error description information when call fails |
OpenIMApiError
Type
export class OpenIMApiError extends Error {
name: string = 'OpenIMApiError';
code: number;
message: string;
operationID: string;
constructor(code: number, message: string, operationID: string) {
super(message);
this.code = code;
this.message = message;
this.operationID = operationID;
}
}
Field Description
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Error name |
| code | number | Error code when call fails |
| message | string | Error description information when call fails |
| operationID | string | The operationID passed during the call |
WsResponse
Type
type WsResponse<T = unknown> = {
errCode: number;
errMsg: string;
data: T;
operationID: string;
};
Field Description
| Field Name | Field Type | Description |
|---|---|---|
| errCode | number | Error code when call fails |
| errMsg | string | Error description information when call fails |
| operationID | string | The operationID passed during the call |
| data | T | Return result when call is successful, as generic |
WSEvent
Type
type WSEvent<T = unknown> = {
event: CbEvents;
data: T;
errCode: number;
errMsg: string;
operationID: string;
};
Field Description
| Field Name | Field Type | Description |
|---|---|---|
| event | CbEvents | Listener event |
| data | T | Callback result, as generic |
| errCode | number | Error code |
| errMsg | string | Error description information |
| operationID | string | Unique operation id |