Skip to main content
Version: Next

Result Code - IoT SDK

This file defines all possible result codes returned by the VideoSDK functions. Each result code is represented as an enum constant, making it easier for developers to identify, handle, and debug errors in a standardized way across publishing, subscribing, and other SDK operations.

Enum ConstantValueDescription
RESULT_OK0Operation completed successfully with no errors.
SSL_CONNECT_FAILED3001SSL handshake errors occur when the client and server fail to establish a secure connection due to mismatched protocols, certificates, or cipher suites.
HTTP_REQUEST_FAILED3002The HTTP request could not be sent from the device, or the server did not respond to the request.
MEMORY_ALLOC_FAILED3003The system failed to allocate memory because the requested buffer size exceeded the available heap.
DEVICE_NOT_SUPPORTED3004The board does not have the hardware for that direction: receiving audio needs a speaker and receiving video needs a display. The subscribe calls return this code on boards without that hardware (expected, not a failure). See Supported Microcontrollers.
NULL_PARAMETER3005A function call failed because a required input parameter was NULL or empty, resulting in an invalid operation. Ensure all required parameters are properly initialized before invoking the function.
INIT_BOARD_FAILED3006Initialization of the board or audio codec hardware failed, preventing proper device setup.
PEER_INIT_FAILED3007SRTP connection initialization failed due to cryptographic or configuration errors.
TASK_ALREADY_STARTED3008An attempt was made to start a task that was already running. To resolve this, stop the task first and then try again.
PUBLISH_MUTEX_CREATE_FAILED3009Failed to create a mutex required for synchronizing the media publishing operation.
AUDIO_CODEC_INIT_FAILED3010Audio codec initialization failed due to a codec mismatch. Try using a different codec to resolve the issue.
PUBLISH_PEER_CONNECTION_FAILED3011The peer connection setup for publishing failed, usually due to signaling or transport issues.
PUBLISH_MEMORY_ALLOC_FAILED3012The system failed to allocate the memory required for the publishing process.
PUBLISH_TASK_CREATE_FAILED3013Task creation for handling media publishing failed, often due to insufficient or incorrect parameters.
SUBSCRIBE_MUTEX_CREATE_FAILED3014Failed to create a mutex required for synchronizing the media subscription operation.
SUBSCRIBE_PEER_CONNECTION_FAILED3015The peer connection setup for subscribing to media failed, typically due to negotiation or network errors.
SUBSCRIBE_MEMORY_ALLOC_FAILED3016The system failed to allocate the memory required for the subscribing process.
SUBSCRIBE_TASK_CREATE_FAILED3017Task creation for handling subscriptions failed, often due to insufficient resources.
STOP_PUBLISH_TASK_CREATE_FAILED3018leave() could not start tearing down the publishing side, so nothing was torn down and the session is still active. Free some memory and call leave() again.
STOP_SUBSCRIBE_TASK_CREATE_FAILED3019leave() could not start tearing down the subscribing side, so nothing was torn down and the session is still active. Free some memory and call leave() again.
CANDIDATE_PAIR_FAILED3020ICE candidate pair checks failed, which means no valid network path was found between peers.
DTLS_HANDSHAKE_FAILED3021The DTLS handshake between peers failed due to a certificate or cryptographic mismatch.
LEAVE_FAILED3022Teardown started but did not finish within 6 seconds, so something is stuck. Unlike 3018/3019, the session is not left intact, so do not assume it is safe to rejoin immediately.
INIT_NOT_CALLED3023This error occurs when the init() function was not called before using other functions like publish() or subscribe(). To resolve this, call init() first.
DATA_CHANNEL_NOT_STARTED3025sendMessage() was called before startMessageChannel(). Call startMessageChannel() once before sending messages.
DATA_CHANNEL_QUEUE_FULL3026The message send queue is momentarily full, so the message was not queued. Retry shortly.

Got a Question? Ask us on discord