Better error handling and retries
Opened this issue · 0 comments
We need to do a better job on the client at dealing with various kinds of errors and timeouts.
-
If a conversation never gets started after calling .start(), we should proactively stop it and reconnect. This would be a workaround for #25.
-
If the Websocket connection fails, we need to deal with that and retry a few times, showing an error page if the error is persistent. The challenge here is that this is currently managed internally by the VoiceSession and the app does not have visibility into the connection state. We should migrate .warmup() out of the constructor so it can use the onerror signal that the client sets up for this, be sure we're catching errors on .warmup() and calling .onerror when they do happen, and probably also expose the connection state (not just the live conversation state) as part of the VoiceSession.state field.
-
CallCharacter should transition to an error page if it gets an error and retries aren't working.