How To Handle Errors

Wondering where these errors are thrown so we can catch them and handle them accordingly.

They are not caught in the catch of .connect()

Error1:

r {name: “GENERIC_ERROR”, message: “Remote connection con_xxxxxx unknown when ‘onParticipentLeft’. Existing remote connections: {}”}

Error2 (maybe there is a place for an onerror callback?):

failed WebSocket is closed before the connection is established

Could not connect to wss://server_name?sessionId=ses_xxxxxx (invoking onerror if defined)

Error 3:

WebSocket is already in CLOSING or CLOSED state

It seems like some of these could be easily handled if there was a way to check if you are connected to a session. This is also something we haven’t been able to.

Thanks!

1 Like

Hi , next release 2.18.0 will include a new openvidu-browser event which allow handle this kind of exceptions.

It’ll be (presumably) released the next week.

Stay tuned :slight_smile: