onError

abstract fun onError(session: SyncSession, error: SyncException)

Callback for errors on a session object. It is not recommended to throw an exception inside an error handler, as the exception will be caught, logged, and ignored by Realm. Instead, it is better to manually catch all exceptions and manually handle these exceptions.

Parameters

session

the SyncSession in which this error happened.

error

the SyncException being reported by the server.