In our code we want to handle error events from the Sync Gateway by sending a disconnect broadcast. We basically look for any 4xx, 5xx, or 6xx error code here. My question is if the Sync Gateway would ever send an error code in the range of 400-699 during normal operation that we should not disconnect the user for?
Thank you for your Quick reply.
I tried to check the status (== REPLICATION_STOPPED), and it looks like not working as expected. I got this status when a Sync Gateway session expires, but I got it as well earlier without any session expired… so I cannot send a disconnect broadcast based on this status.
Is there any code error between 400 - 699 that we should not catch, otherwise we send the disconnect broadcast (the replicator may be still working and retry the connection, etc so we do not have to intervene)?
I tried to check the status (== REPLICATION_STOPPED), and it looks like not working as expected. I got this status when a Sync Gateway session expires, but I got it as well earlier without any session expired
A one-shot replicator will stop when the replication is done, or if it can’t (re)connect. Session expiry definitely isn’t the only explanation.
I don’t understand what it is you’re trying to do. What do you mean by “send a disconnect broadcast”?