VideoSDKError class

A VideoSDK operation that failed, with the same code, name and message the JS, Android and iOS SDKs report.

The constants below are the catalogue the native SDKs share; each carries its code, name and default message. Two errors are equal when their code is, so compare with a constant; never match on message, which may carry server-provided wording.

try {
  await room.join();
} on VideoSDKError catch (e) {
  if (e == VideoSDKError.INVALID_TOKEN) { /* fetch a new token */ }
  if (e == VideoSDKError.ERROR_OPERATION_IN_PROGRESS) { /* double tap */ }
}

Common codes

Code Name Meaning
3035 ERROR_ACTION_PERFORMED_BEFORE_ROOM_JOINED The call needs a joined room.
3051 ERROR_NO_WEBCAM_DEVICE_FOUND No camera was found.
3054 ERROR_ALREADY_IN_REQUESTED_STATE Nothing to do — it is already in that state.
3055 ERROR_OPERATION_IN_PROGRESS The same operation is already running.
3056 ERROR_OPERATION_ABORTED The operation was aborted.
3059 ERROR_NO_MICROPHONE_DEVICE_FOUND No microphone was found.
3065 ERROR_ROOM_RECONNECTING The room is reconnecting; try again once it is back.
3071 ERROR_INVALID_CUSTOM_TRACK_CONFIG The track configuration is not one the SDK knows.
3073 ERROR_INVALID_PARAMETER An argument is invalid, for example an empty room id.
4000 UNKNOWN_ERROR The error could not be classified.
4002 INVALID_TOKEN The token was rejected.

Names keep the catalogue's spelling verbatim, including MAX_PARTCIPANT_REACHED and UNAUTHORIZED_PARTCIPANT_ID.

A failure the native SDK did not describe is reported as 4000 UNKNOWN_ERROR with the original message.

Implemented types

Constructors

VideoSDKError({required int code, required String name, required String message})
Creates an error carrying the engine's numeric code, message and name.
const

Properties

code → int
The numeric catalogue code, for example 3055 or 4002.
final
hashCode → int
The hash code for this object.
no setteroverride
message → String
The server-provided or catalogue default description.
final
name → String
The catalogue name, for example ERROR_OPERATION_IN_PROGRESS.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

ACCOUNT_DEACTIVATED → const VideoSDKError
ACCOUNT_DISCONTINUED → const VideoSDKError
ADAPTIVE_SUBSCRIPTION_DISABLE_FAILED → const VideoSDKError
ADAPTIVE_SUBSCRIPTION_ENABLE_FAILED → const VideoSDKError
ADAPTIVE_SUBSCRIPTION_NOT_ENABLED_BY_SDK → const VideoSDKError
ADD_ON_SERVICES_DISABLED → const VideoSDKError
APIKEY_DEACTIVATED → const VideoSDKError
CHANGE_MODE_FAILED → const VideoSDKError
CHANGE_TRANSLATION_LANGUAGE_FAILED → const VideoSDKError
CODEC_NOT_SUPPORTED → const VideoSDKError
CONSUME_MIC_STREAMS_FAILED → const VideoSDKError
CONSUME_WEBCAM_STREAMS_FAILED → const VideoSDKError
CREATE_CONSUMER_FAILED → const VideoSDKError
DISABLE_PARTICIPANT_MIC_FAILED → const VideoSDKError
DISABLE_PARTICIPANT_WEBCAM_FAILED → const VideoSDKError
DUPLICATE_PARTICIPANT → const VideoSDKError
ENABLE_PARTICIPANT_MIC_FAILED → const VideoSDKError
ENABLE_PARTICIPANT_WEBCAM_FAILED → const VideoSDKError
ERROR_ACTION_NOT_SUPPORTED → const VideoSDKError
ERROR_ACTION_NOT_SUPPORTED_IN_MODE → const VideoSDKError
ERROR_ACTION_PERFORMED_BEFORE_ROOM_JOINED → const VideoSDKError
ERROR_ALREADY_IN_REQUESTED_STATE → const VideoSDKError
ERROR_AUDIO_TRACK_CREATION_FAILED → const VideoSDKError
ERROR_BLUETOOTH_AUDIO_ROUTE_FAILED → const VideoSDKError
ERROR_BLUETOOTH_PERMISSION_DENIED → const VideoSDKError
ERROR_CAMERA_ACCESS → const VideoSDKError
ERROR_CAMERA_ACCESS_DENIED → const VideoSDKError
ERROR_CAMERA_ACCESS_DENIED_OR_DISMISSED → const VideoSDKError
ERROR_CAMERA_ACCESS_UNAVAILABLE → const VideoSDKError
ERROR_CAMERA_IN_USE → const VideoSDKError
ERROR_CAMERA_NOT_FOUND → const VideoSDKError
ERROR_CAMERA_PERMISSION_DENIED_BY_OS → const VideoSDKError
ERROR_CAMERA_PERMISSION_OR_AUTOPLAY_ISSUE → const VideoSDKError
ERROR_CAPTURE_IMAGE_FAILED → const VideoSDKError
ERROR_CHANGE_WEBCAM → const VideoSDKError
ERROR_CUSTOM_AUDIO_TRACK_ENDED → const VideoSDKError
ERROR_CUSTOM_SCREEN_SHARE_TRACK_DISPOSED → const VideoSDKError
ERROR_CUSTOM_SCREEN_SHARE_TRACK_ENDED → const VideoSDKError
ERROR_CUSTOM_VIDEO_TRACK_ENDED → const VideoSDKError
ERROR_END_ROOM_FAILED → const VideoSDKError
ERROR_FILE_FETCH_FAILED → const VideoSDKError
ERROR_FILE_UPLOAD_FAILED → const VideoSDKError
ERROR_GET_AUDIO_MEDIA → const VideoSDKError
ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED → const VideoSDKError
ERROR_GET_DISPLAY_MEDIA → const VideoSDKError
ERROR_GET_DISPLAY_MEDIA_PERMISSION_DENIED → const VideoSDKError
ERROR_GET_VIDEO_MEDIA → const VideoSDKError
ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED → const VideoSDKError
ERROR_INVALID_CUSTOM_AUDIO_TRACK → const VideoSDKError
ERROR_INVALID_CUSTOM_TRACK_CONFIG → const VideoSDKError
ERROR_INVALID_CUSTOM_VIDEO_TRACK → const VideoSDKError
ERROR_INVALID_MODE → const VideoSDKError
ERROR_INVALID_PARAMETER → const VideoSDKError
ERROR_MEDIA_DEVICE_NOT_INITIALIZED → const VideoSDKError
ERROR_MEDIA_DEVICE_NOT_LOADED → const VideoSDKError
ERROR_MEDIA_NOT_READY → const VideoSDKError
ERROR_MIC_ACCESS_DENIED → const VideoSDKError
ERROR_MICROPHONE_ACCESS_DENIED_OR_DISMISSED → const VideoSDKError
ERROR_MICROPHONE_ACCESS_UNAVAILABLE → const VideoSDKError
ERROR_MICROPHONE_CLOSE_PRODUCER_FAILED → const VideoSDKError
ERROR_MICROPHONE_IN_USE → const VideoSDKError
ERROR_MICROPHONE_NOT_FOUND → const VideoSDKError
ERROR_MICROPHONE_PERMISSION_DENIED_BY_OS → const VideoSDKError
ERROR_MICROPHONE_PRODUCE_FAILED → const VideoSDKError
ERROR_MICROPHONE_TRACK_ENDED → const VideoSDKError
ERROR_MULTISTREAM_NOT_SUPPORTED → const VideoSDKError
ERROR_NO_MICROPHONE_DEVICE_FOUND → const VideoSDKError
ERROR_NO_SUPPORTED_VIDEO_CODEC → const VideoSDKError
ERROR_NO_WEBCAM_DEVICE_FOUND → const VideoSDKError
ERROR_OPERATION_ABORTED → const VideoSDKError
ERROR_OPERATION_IN_PROGRESS → const VideoSDKError
ERROR_OPERATION_TIMED_OUT → const VideoSDKError
ERROR_PAYLOAD_TOO_LARGE → const VideoSDKError
ERROR_RN_CAMERA_ACCESS_DENIED_OR_DISMISSED → const VideoSDKError
ERROR_RN_CAMERA_ACCESS_UNAVAILABLE → const VideoSDKError
ERROR_RN_CAMERA_NOT_FOUND → const VideoSDKError
ERROR_RN_CAMERA_TRACK_ENDED → const VideoSDKError
ERROR_RN_MIC_ACCESS_DENIED_OR_DISMISSED → const VideoSDKError
ERROR_RN_MIC_ACCESS_UNAVAILABLE → const VideoSDKError
ERROR_RN_MIC_NOT_FOUND → const VideoSDKError
ERROR_RN_MIC_TRACK_ENDED → const VideoSDKError
ERROR_ROOM_MEDIA_CONNECTION_FAILED → const VideoSDKError
ERROR_ROOM_RECONNECTING → const VideoSDKError
ERROR_SCREENSHARE_CLOSE_PRODUCER_FAILED → const VideoSDKError
ERROR_SCREENSHARE_PRODUCE_FAILED → const VideoSDKError
ERROR_SEND_FAILED → const VideoSDKError
ERROR_SET_WEBCAM_QUALITY_FAILED → const VideoSDKError
ERROR_UNABLE_TO_JOIN_ROOM → const VideoSDKError
ERROR_VIDEO_PRODUCE_CODEC_NOT_SUPPORTED → const VideoSDKError
ERROR_VIDEO_SOURCE_INITIATION_FAILED → const VideoSDKError
ERROR_VIDEO_TRACK_CREATION_FAILED → const VideoSDKError
ERROR_WEBCAM_CLOSE_PRODUCER_FAILED → const VideoSDKError
ERROR_WEBCAM_NOT_ENABLED → const VideoSDKError
ERROR_WEBCAM_PRODUCE_FAILED → const VideoSDKError
ERROR_WEBCAM_TRACK_ENDED → const VideoSDKError
FAILED_TO_GET_VALUE → const VideoSDKError
FAILED_TO_OBSERVE_VALUE → const VideoSDKError
FAILED_TO_SET_VALUE → const VideoSDKError
FAILED_TO_STOP_OBSERVING_VALUE → const VideoSDKError
HLS_DURATION_LIMIT_REACHED → const VideoSDKError
HLS_FAILED → const VideoSDKError
INVALID_API_KEY → const VideoSDKError
INVALID_LIVESTREAM_CONFIG → const VideoSDKError
INVALID_PARTICIPANT_ID → const VideoSDKError
INVALID_PERMISSIONS → const VideoSDKError
INVALID_ROOM_ID → const VideoSDKError
INVALID_TOKEN → const VideoSDKError
LIVESTREAM_DURATION_LIMIT_REACHED → const VideoSDKError
LIVESTREAM_FAILED → const VideoSDKError
MAX_HLS_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
MAX_PARTCIPANT_REACHED → const VideoSDKError
MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
MAX_RECV_ONLY_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
MAX_SPEAKER_REACHED → const VideoSDKError
MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION → const VideoSDKError
PARTICIPANT_RECORDING_FAILED → const VideoSDKError
PAUSE_ALL_STREAMS_FAILED → const VideoSDKError
PAUSE_STREAM_FAILED → const VideoSDKError
PIN_FAILED → const VideoSDKError
PREV_HLS_STREAMING_PROCESSING → const VideoSDKError
PREV_RECORDING_PROCESSING → const VideoSDKError
PREV_RTMP_RECORDING_PROCESSING → const VideoSDKError
PUBSUB_PUBLISH_FAILED → const VideoSDKError
PUBSUB_SUBSCRIBE_FAILED → const VideoSDKError
PUBSUB_UNSUBSCRIBE_FAILED → const VideoSDKError
RECORDING_DURATION_LIMIT_REACHED → const VideoSDKError
RECORDING_FAILED → const VideoSDKError
REMOVE_PARTICIPANT_FAILED → const VideoSDKError
REQUEST_MEDIA_RELAY_FAILED → const VideoSDKError
RESPOND_ENTRY_FAILED → const VideoSDKError
RESPOND_MEDIA_RELAY_REQUEST_FAILED → const VideoSDKError
RESUME_ALL_STREAMS_FAILED → const VideoSDKError
RESUME_STREAM_FAILED → const VideoSDKError
ROOM_ID_DISABLED → const VideoSDKError
SET_QUALITY_FAILED → const VideoSDKError
SOMETHING_WENT_WRONG → const VideoSDKError
START_COMPOSITE_RECORDING_FAILED → const VideoSDKError
START_HLS_FAILED → const VideoSDKError
START_LIVESTREAM_FAILED → const VideoSDKError
START_PARTICIPANT_RECORDING_FAILED → const VideoSDKError
START_RECORDING_FAILED → const VideoSDKError
START_TRACK_RECORDING_FAILED → const VideoSDKError
START_TRANSCRIPTION_FAILED → const VideoSDKError
START_TRANSLATION_FAILED → const VideoSDKError
START_WHITEBOARD_FAILED → const VideoSDKError
STOP_COMPPOSITE_RECORDING_FAILED → const VideoSDKError
STOP_CONSUMING_MIC_STREAMS_FAILED → const VideoSDKError
STOP_CONSUMING_WEBCAM_STREAMS_FAILED → const VideoSDKError
STOP_HLS_FAILED → const VideoSDKError
STOP_LIVESTREAM_FAILED → const VideoSDKError
STOP_MEDIA_RELAY_FAILED → const VideoSDKError
STOP_PARTICIPANT_RECORDING_FAILED → const VideoSDKError
STOP_RECORDING_FAILED → const VideoSDKError
STOP_TRACK_RECORDING_FAILED → const VideoSDKError
STOP_TRANSCRIPTION_FAILED → const VideoSDKError
STOP_TRANSLATION_FAILED → const VideoSDKError
STOP_WHITEBOARD_FAILED → const VideoSDKError
SWITCH_PARTICIPANT_ROOM_FAILED → const VideoSDKError
SWITCH_ROOM_FAILED → const VideoSDKError
TRACK_RECORDING_FAILED → const VideoSDKError
TRANSCRIPTION_FAILED → const VideoSDKError
TRANSLATION_FAILED → const VideoSDKError
UNAUTHORIZED_PARTCIPANT_ID → const VideoSDKError
UNAUTHORIZED_REQUEST → const VideoSDKError
UNAUTHORIZED_ROLE → const VideoSDKError
UNAUTHORIZED_ROOM_ID → const VideoSDKError
UNKNOWN_ERROR → const VideoSDKError
UNPIN_FAILED → const VideoSDKError
WHITEBOARD_OPERATION_IN_PROGRESS → const VideoSDKError