videosdk-live/videosdk.live

[js-sdk] not getting `INVALID_MEETING_ID` error

Opened this issue · 3 comments

Hello,

I'm trying out your service and have setup a simple demo, I wanted to test if I'm able to get reliable errors.

With latest js sdk, I you try to init & join a meeting that doesn't exists, you get a meeting-state-changed FAILED.
But no error event.

Demo code :

  const meeting = VideoSDK.initMeeting({
    meetingId: 'wrongnumber',
    name: 'Participant',
    micEnabled: true,
    webcamEnabled: true,
    multiStream: false
  })

  meeting.on('error', (data) => {
    console.log('error', data)
  })

  meeting.on('meeting-state-changed', ({ state }) => {
    console.log('state-changed', state)
  })

  meeting.on('meeting-joined', () => {
    console.log('meeting-joined')
  })

  meeting.join()

Hello @michael-dm, sorry for the late reply. If the meeting ID is invalid, you will receive an error with the code INVALID_MEETING_ID in the onError event. You can refer to the documentation below for more information.

https://docs.videosdk.live/javascript/guide/video-and-audio-calling-api-sdk/get-notified/error-events

@ishabodiwala Thanks for your answer.

I know this is what's supposed to happen, however in latest version of the client it's not !
See provided code sample above. This is never called with INVALID_MEETING_ID:

meeting.on('error', (data) => {
  console.log('error', data)
})