- Display error message or any error
- Handler errors when connecting to the OpenVidu session
I don't think so. A 422 response should contain the 3xx code response in the json data. In normal circumstances there will be no 422 response without the 3xx code in json response.
No, you can't loose the (main) token. Here we're preventing from calling initSession() again if the token has been already acquired. It's needed because after openvidu connection error we might end up in joinSession() again.
See comment why I'm not entirely clear why we don't require the roomStateLabel but nevertheless require a special case for 422, but looks good enough.
I don't follow. It seems to me this.roomState can be equal to 422, and in this case it seems like there should be a corresponding label, unless the label is somehow not displayed, in which case I don't get why we need to make an exception for 422.
If you are certain it's correct, that's fine by me.