Skip to main content
caution

This page has been deprecated.

We've released a new version of pages with some improvements and smoother experience.

Here is the link of each SDK for this page.

Error Event

This event is helpful for development level troubleshooting while integrating SDK.

Whenever any invalid configuration provided or server/network errors arise, this event will trigger with a specific error code and message.

This event can ease your development process.

We have depicted a specific constant with code and message in the below table.

ConstantCodeMessage
INVALID_API_KEY4001apikey provided in the token is empty or invalid, please verify it on the dashboard.
INVALID_TOKEN4002token is empty or invalid or might have expired.
INVALID_MEETING_ID4003meetingId is empty or invalid, please verify it or generate new meetingId using the API.
INVALID_PARTICIPANT_ID4004participantId is empty or invalid, it shouldn't contain any whitespaces.
DUPLICATE_PARTICIPANT4005Leaving meeting, since this participantId joined from another device.
ACCOUNT_DEACTIVATED4006It seems your account is deactivated by VideoSDK for some reason, you can reach out to us at support@videosdk.live.
ACCOUNT_DISCONTINUED4007Server will respond you with specific message.
INVALID_PERMISSIONS4008permissions provided in the token are invalid, please don't use allow_join or allow_mod with ask_join.
MAX_PARTCIPANT_REACHED4009You have reached max partcipant limit in a meeting.
MAX_SPEAKER_REACHED4010You have reached max speaker limit in a meeting.
START_RECORDING_FAILED4011Recording start request failed due to an unknown error.
STOP_RECORDING_FAILED4012Recording stop request failed due to an unknown error.
START_LIVESTREAM_FAILED4013Livestream start request failed due to an unknown error.
STOP_LIVESTREAM_FAILED4014Livestream stop request failed due to an unknown error.
INVALID_LIVESTREAM_CONFIG4015Livestream 'outputs' configuration provided was invalid.
RECORDING_FAILED5001Recording stopped due to an unknown error.
LIVESTREAM_FAILED5002Livestream stopped due to an unknown error.

Event Code

import { VideoSDK } from "@videosdk.live/js-sdk";

meeting.on("error", (data) => {
const { code, message } = data;

// Get Constant from SDK which contain value of error Code
const { INVALID_TOKEN, INVALID_MEETING_ID } = VideoSDK.constants.errors;

switch (code) {
case INVALID_TOKEN:
console.log(`Error is ${message}`);
break;

case INVALID_MEETING_ID:
console.log(`Error is ${message}`);
break;

default:
break;
}
});