The error passed to onError() is a VideoSDKError with three properties:
Property
Type
Description
code
Int
Numeric error code, matching a constant returned by VideoSDK.getErrorCodes().
name
String
The error-code constant name, for example "PUBSUB_SUBSCRIBE_FAILED".
message
String
Human-readable reason. For server-reported errors this is the server's specific message when it sends one.
To check for a specific error, compare it with a VideoSDKError constant using ==, or match it in a when that has an else branch. Two errors are equal when their codes are equal. Each error is a new object, so don't compare with ===.
Error codes changed in 3.0.0
Several error codes were renumbered in 3.0.0, and some old numbers now mean something else. For example, ERROR_ACTION_PERFORMED_BEFORE_ROOM_JOINED moved from 3001 to 3035, and ERROR_ROOM_RECONNECTING moved from 3014 to 3065. Match errors with VideoSDKError.fromCode(code) instead of raw numbers. See the migration guide for the full list.
Actions such as join(), leave() and unmuteMic() are suspend functions. Call them from a coroutine, for example with lifecycleScope from androidx.lifecycle:lifecycle-runtime-ktx.
When an action is refused or fails, it throws a VideoSDKException, which carries a code and a name from the same list of error codes. e.error returns them as a VideoSDKError. Most of these errors are also reported on onError, but some are only thrown, so catch the exception where you call the action. An exception you don't catch crashes the app.
Called before the room is joined, or while it is reconnecting, most actions only report 3035 or 3065 on onError and do not throw.
The tables below list each constant with its code and message.
note
In the Android SDK, VideoSDKError and VideoSDK.getErrorCodes() name code 4009MAX_PARTCIPANT_REACHED and code 4023UNAUTHORIZED_PARTCIPANT_ID. Compare errors by code, not by name.
This table lists errors that occur due to the configuration and limitations within your organization’s account. These include account status, participant limits, and add-on service availability.
Name
Code
Message
ACCOUNT_DEACTIVATED
4006
Your account has been deactivated. Please contact VideoSDK support.
ACCOUNT_DISCONTINUED
4007
Your account has been discontinued. Please reach out to support for more details.
MAX_PARTICIPANT_REACHED
4009
You have reached the maximum participant limit for this meeting.
MAX_SPEAKER_REACHED
4010
The maximum number of speakers for this meeting has been reached.
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION
4026
Your organization has reached the maximum number of speakers allowed.
MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION
4027
Your organization has reached the maximum number of viewers allowed.
ADD_ON_SERVICES_DISABLED
4021
Add-On services have been disabled. Please contact support to enable them.
MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATION
4028
You have reached max limit of recording on organization. To increase contact at support@videosdk.live
MAX_HLS_LIMIT_REACHED_ON_ORGANIZATION
4029
You have reached max limit of hls on organization. To increase contact at support@videosdk.live
MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATION
4030
You have reached max limit of livestream on organization. To increase contact at support@videosdk.live
MAX_RECV_ONLY_LIMIT_REACHED_ON_ORGANIZATION
4041
Your organization has reached the maximum recv-only limit. To increase contact at support@videosdk.live
Errors listed here are related to issues with the API key, authentication tokens, or permissions assigned to users. These errors can occur when tokens are missing, expired, or improperly configured.
Name
Code
Message
INVALID_API_KEY
4001
The provided API key is either missing or invalid.
INVALID_TOKEN
4002
The provided token is empty, invalid, or has expired.
INVALID_PERMISSIONS
4008
The permissions in the token are incorrect. Please verify them.
UNAUTHORIZED_MEETING_ID
4022
The provided token is not authorized for this meeting ID.
UNAUTHORIZED_PARTICIPANT_ID
4023
The provided token is not authorized for this participant ID.
UNAUTHORIZED_ROLE
4024
The role specified in the token is not valid for joining this meeting.
UNAUTHORIZED_REQUEST
4025
Your request does not match the security configuration.
APIKEY_DEACTIVATED
4053
The provided API key is deactivated. Please verify it on the dashboard.
3. Errors associated with Meeting and Participant
This table lists errors resulting from invalid or missing meeting or participant details, including cases where a participant attempts to join with a duplicate ID.
Name
Code
Message
INVALID_MEETING_ID
4003
The meeting ID provided is either invalid or missing.
INVALID_PARTICIPANT_ID
4004
The participant ID is either invalid or missing.
DUPLICATE_PARTICIPANT
4005
This participant has joined from another device.
MEETING_ID_DISABLED
4052
The provided meeting ID is disabled. Please generate a new meetingId using the API.
These errors are triggered when an action cannot run in the current state — called before the room is joined, while it is reconnecting, while the same action is still running, with an invalid argument, or when the SDK cannot reach the VideoSDK servers in time. The delivered message names the rejected method when available; the messages below are the fallback text.
Oops! Something went wrong. The room was in a connecting state, and during that time, an action encountered an issue. Please try again after joining a room.
ERROR_ACTION_NOT_SUPPORTED_IN_MODE
3066
This action is not supported in the current room mode.
ERROR_ACTION_NOT_SUPPORTED
3068
This action is not supported here.
ERROR_INVALID_PARAMETER
3073
The provided parameter is missing or invalid. Please verify the provided parameter and try again.
The room is reconnecting. Please try again once it reconnects.
8. Errors associated with Participant and Meeting
These errors are triggered when the server rejects a request that targets a remote participant or changes the room — including stream subscriptions, room mode, room switching, and media relay. The state stays as it was.
These errors are triggered while using in-room collaboration features such as PubSub messaging, data messages, file sharing, the realtime key-value store, the whiteboard, and translation.
These errors are reported when the cause of a failure is not known.
Name
Code
Message
UNKNOWN_ERROR
4000
An unknown error occurred.
SOMETHING_WENT_WRONG
5000
Something went wrong.
note
An error reaches your app as a VideoSDKException thrown by the call that failed, on onError, or both. 3048, 3066, 3072 and 3073 are only thrown: they never reach onError. The exception is VideoSDK.createScreenShareVideoTrack(), which returns null and reports 3048 on onError.
A repeated disableAdaptiveSubscription() currently reports 4048, not 4049.
3080 is only reported on onError, once each time the GPU effects can't start, and its message ends with Reason: and the runtime error. Nothing is thrown, and the call keeps going without effects. A GRAPH request made before any camera has started is not an error.
The message you receive can be more specific than the text in these tables: for example, the server's own message, or one that names the call that failed. Check the code, not the message.
VideoSDKError also lists codes that the Android SDK never reports as a VideoSDKException or on onError: 3002 to 3007, 3011, 3012, 3014, 3015, 3020, 3025, 3028 to 3030, 3036 to 3044, 3067 and 3078. A pre-call test can still report ERROR_MICROPHONE_TRACK_ENDED, ERROR_INVALID_CUSTOM_VIDEO_TRACK or ERROR_INVALID_CUSTOM_AUDIO_TRACK as the code of a PreCallTestException.