Open GalenBry opened 1 month ago
@GalenBry Thanks for submitting issue. Have you tried to use the messaging session observer event messagingSessionDidStartConnecting
to catch if it is reconnect https://github.com/aws/amazon-chime-sdk-js/blob/main/src/messagingsessionobserver/MessagingSessionObserver.ts#L8
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 forDefaultMessagingSession
, it looks like you can catch an error when initially callingsession.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