OpenSDK
V4.2.0
|
Get the error codes via OpenSDK_GetLastErrorCode and get the error code information via OpenSDK_GetLastErrorDesc. The API only returns 0 and -1 by default (except some special API). The error code of SDK is listed according to modules. Major and frequently-occurred error codes are shown below.
error code is defined in the header file of OpenNetStreamError.h.
return via information callback function, refer to header file of INS_ErrorCode.h for details.
error code format{xbbbbb}, x represents the module type of error code, bbbbb represent what the error is, the value of x is shown below:
type | definition | remark |
---|---|---|
0 | correct condition | correct |
1 | network exception | This error is the same with network or configuration information error, so CURL ErrorCode is still available, for example, DNS is not configured. |
2 | user operation error | User level error code. It is usually caused by improper usage of SDK by the users. |
3 | platform server error | The error returned by OpenApi. For details, refer to error code of server port |
4 | system resource exception | Usually caused by inadequate system resource, e.g., inadequate memory. |
5 | get stream exception | error code of streaming module |
6 | method not supported | SDK unsupported |
7 | push error | push relevant error information |
9 | undefined error | error code without specific definition |
The following table shows the definition of the detailed error code value.
Description | Value | Definition | Remark |
---|---|---|---|
Network Level | |||
OPEN_SDK_COULDNT_RESOLVE_HOST | 100006 | unable to resolve to specified remote host | Here it refers that the domain name of the platform fails to be resolved. The reason maybe that the DNS is not configured or the device is disconnected. |
OPEN_SDK_COULDNT_CONNECT | 100007 | the remote host is unavailable | Here it refers to failing to access the platform. It may be caused by incorrect platform address. |
OPEN_SDK_OPERATION_TIMEOUT | 100028 | request timed out | The expiry time is 20s. Request timed out. Check the address configuration of the platform. |
User Operation Level | |||
OPEN_SDK_BAD_PARAMS | 200001 | Invalid incoming parameter of API | |
OPEN_SDK_SESSION_INVALID | 200002 | The current session doesn't exist or has been released. | incoming value of SessionId error or the Session has been deleted. |
OPEN_SDK_VIDEO_RECORD_NOT_EXIST | 200003 | No video file exists in the specified period. | |
OPEN_SDK_VIDEO_RECORD_SEARCHING | 200004 | Searching video records... | |
OPEN_SDK_STOP_ALARM_REC_FAILED | 200005 | Failed to disable alarm. | |
OPEN_SDK_PERMANENT_KEY_INVALID | 200006 | Incorrect verificaiton code. | |
OPEN_SDK_PIC_DECRYPT_FAILED | 200007 | Failed to decode the picture. | |
OPEN_SDK_PIC_CONTENT_INVALID | 200008 | Invalid picture content. | |
OPEN_SDK_PIC_NO_NEED_DECRYPT | 200009 | The picture doesn't need to be decoded. | |
OPEN_SDK_PIC_COULDNT_ALLOC_BUFFERS | 200010 | Failed to allocate memory of picture resources. | Insufficient memory or the picture size is too large. |
EZVIZ API Level | |||
OPEN_SDK_RESPINFO_BAD | 300001 | The information requested to return. json cannot resolve it. | It may be caused by the configuration problem ofPlatformAddr. |
OPEN_SDK_RESPINFO_INVALID | 300002 | Incorrect return information format of the request. | |
OPEN_SDK_ACCESSTOKEN_INVALID | 310002 | accesstoken exception or accesstoken has been expired. | |
OPEN_SDK_SIGNATURE_ERROR | 310008 | Incoming parameter error. System displaying signature error. | |
OPEN_SDK_USERID_PHONE_UNBIND | 310014 | The third-party userId and phone under APPKEY are unbound. | |
OPEN_SDK_CHANNEL_NOT_EXIST | 320001 | The channel doesn't exist. | The channel corresponds with a specific camera. |
OPEN_SDK_USER_NOTOWN_DEVICE | 320018 | The user doesn't have the device. | |
System Resource Level | |||
OPEN_SDK_COULDNT_CREATE_THREAD | 400001 | Failed to create a thread. | |
OPEN_SDK_COULDNT_ALLOC_BUFFERS | 400002 | Failed to apply memory resources. | |
Streaming Function Level | |||
OPEN_SDK_NS_OPERATIONCODE_FAILED | 500045 | Failed to get operation code. | It will report this error if users enabled terminal binding. |
OPEN_SDK_NS_STREAM_LIMIT | 500410 | Limit of streaming channel number | The device connection number reaches upper limit. |
OPEN_SDK_NS_DEV_NO_ONLINE | 503121 | Device offline | |
OPEN_SDK_NS_PERMANENTKEY_EXCEPTION | 502012 | Input key again. 1. Clear-text key and MD5 key mismatched. | Verification code error. |
OPEN_SDK_NS_VTDU_TIMEOUT | 502021 | Stream media sending or receiving signal timed out. | Check the device network status. It is usually caused by network problems. |
OPEN_SDK_NS_VTDU_CLIENT_TIMEOUT | 502025 | vtduThe client receiving response timed out. | The camera and DVR/NVR may have connection problems. |
Unsupported Level | |||
OPEN_SDK_DEV_NOT_SUPPORT | 600001 | Only support device of version 1.7. | |
OPEN_SDK_API_NO_IMPLEMENT | 600002 | The API is not realized. | |
Push message level error. | |||
OPEN_SDK_PUSH_PARAM_ERROR | 710001 | Invalid incoming parameters. | |
OPEN_SDK_PUSH_DATA_UNINIT_ERROR | 710002 | The data is uninitialized. | Initialize by calling the API Init first. |
OPEN_SDK_PUSH_NO_REGISTER_ERROR | 710003 | Unregistered on the push system. | Call register API first. |
OPEN_SDK_PUSH_NO_MQTT_CREATE_ERROR | 710004 | Push object hasn't been created. | You haven't call create API. |
OPEN_SDK_PUSH_MQTT_DISCONNECTED_ERROR | 720003 | sdk disconnected with push server. | Network disconnected or unstable network. |
OPEN_SDK_PUSH_MQTT_MAX_MESSAGES_ERROR | 720004 | The number of the received push messages reaches upper limit. | |
OPEN_SDK_PUSH_MQTT_BAD_UTF8_STRING_ERROR | 720005 | Invalid UTF-8 string. | |
OPEN_SDK_PUSH_MQTT_NULL_PARAMETER_ERROR | 720006 | The incoming parameter is empty pointer. | |
OPEN_SDK_PUSH_MQTT_VERSION_INVALID_ERROR | 730001 | Connection fails. Unsupported by the protocol version. | |
OPEN_SDK_PUSH_MQTT_IDENTIFIER_ERROR | 730002 | Connection fails, the only ID is incorrect. | |
OPEN_SDK_PUSH_MQTT_SERVER_UNAVAILABLE_ERROR | 730003 | Connection fails. The service doesn't exist. | |
OPEN_SDK_PUSH_MQTT_BAD_USERNAME_PASSWORD_ERROR | 730004 | Connection fails. Incorrect mqtt username and password. | |
OPEN_SDK_PUSH_MQTT_NOT_AUTHORIZED_ERROR | 730005 | Connection fails. Unauthorized. | |
OPEN_SDK_PUSH_PLATFORM_RESPINFO_BAD | 740001 | The information returned by the request cannot be resolved normally by json. | It may be caused by invalid configuration of PlatformAddr. |
OPEN_SDK_PUSH_PLATFORM_RESPINFO_INVALID | 740002 | The format of the informaiton returned by the request is incorrect. | |
OPEN_SDK_PUSH_PLATFORM_SESSION_INVALID_ERROR | 740003 | Invalid session. | The session might has been released. |
OPEN_SDK_PUSH_PLATFORM_UNAUTHORIZED_ERROR | 740401 | Invalid certificate. | It may be caused by invalid configuration of PlatformAddr. |
OPEN_SDK_PUSH_COULDNT_CREATE_THREAD | 750001 | Failed to create the thread. | |
OPEN_SDK_PUSH_COULDNT_ALLOC_BUFFERS | 750002 | Failed to apply memory resources. | |
OPEN_SDK_PUSH_COULDNT_RESOLVE_HOST | 760006 | The specified remote host is not been resolved. | Here it refers that the platform domain fails to be resolved normally. It may be caused by unconfigured DNS or disconnected device. |
OPEN_SDK_PUSH_COULDNT_CONNECT | 760007 | The remote host is unavailable | Here it refers that the platform is inaccessible. It may be caused by the configuration error of the platform address. |
OPEN_SDK_PUSH_OPERATION_TIMEOUT | 760028 | Request timed out. The expiry time is 20s. | Sending request to platform timed out. Failed to access the EZVIZ OPEN platform. Check the configured address or the network. |
Undefined Level | |||
OPEN_SDK_ALLOCSESSION_FAILED | 900001 | AllocSession failed. | |
OPEN_SDK_SEARCH_RECORD_FAILED | 900002 | Failed to search playback records. | |
OPEN_SDK_START_ALARM_REC_FAILED | 900003 | Failed to enable alarm. |