You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've understanding that the app should implement an error handler and react on token expiration to keep the device sync going on. The piece of information the error handler gets is an exception that happed.
Which exception is it to which the app should react?
Solution
This could be a documentation issue.
Not sure if there's a missing exception derived from SyncException, which could indicate the need of re-login.
Alternatives
No response
How important is this improvement for you?
I would like to have it but have a workaround
Feature would mainly be used with
Atlas Device Sync
The text was updated successfully, but these errors were encountered:
Hi @pmpuro the app currently throws a SyncException that you can catch in the SyncConfiguration error handler to redirect a user to the login screen again. This could be improved in the future to throw a subclass of SyncException to make it more type safe.
Conf example:
SyncConfiguration.Builder(schema =setOf(Foo::class), user = user)
.errorHandler(object:SyncSession.ErrorHandler {
overridefunonError(session:SyncSession, error:SyncException) {
// handle error and redirect to login potentially
}
})
.build()
Error example
io.realm.kotlin.mongodb.exceptions.SyncException: [Service][AuthError(4346)] Unable to refresh the user access token: invalid session: refresh token expired.
Problem
I've understanding that the app should implement an error handler and react on token expiration to keep the device sync going on. The piece of information the error handler gets is an exception that happed.
Which exception is it to which the app should react?
Solution
This could be a documentation issue.
Not sure if there's a missing exception derived from SyncException, which could indicate the need of re-login.
Alternatives
No response
How important is this improvement for you?
I would like to have it but have a workaround
Feature would mainly be used with
Atlas Device Sync
The text was updated successfully, but these errors were encountered: