amazon-chime-sdk-js icon indicating copy to clipboard operation
amazon-chime-sdk-js copied to clipboard

Handle exceptions during messaging session Websocket reconnection

Open GalenBry opened this issue 1 year ago • 1 comments

What are you trying to do?

I am looking for a way to catch exceptions during messaging client Websocket retry/reconnect. Our application is reporting thousands of errors like this "Event CloseEvent (type=close) captured as promise rejection". We don't have access to a full stack trace unfortunately, but it appears to be coming from DefaultMessagingSession during a users session (specifically, after some time). Looking into the source for DefaultMessagingSession, it looks like you can catch an error when initially calling session.start(), but how would I catch an error if the DefaultMessagingSession detects the Websocket has closed and decides to reconnect? The Promise for that operation is not exposed to my knowledge. This causes a lot of noise, and also reveals that there is no way to handle errors during Websocket reconnect.

How can the documentation be improved to help your use case?

Include a way to handle errors during Websocket reconnection.

What documentation have you looked at so far?

Amazon Chime SDK Developer Guide Amazon Chime SDK API Reference Github Issues StackOverflow

GalenBry avatar Jul 30 '24 20:07 GalenBry