Handle Sync Errors - Java SDK
Atlas Device SDKs are deprecated. Refer to the deprecation page for details.
You can configure an error handler to detect and respond to any errors that occur in the Sync process. To define an error handler, pass an ErrorHandler to the SyncConfiguration.Builder.errorHandler() builder method:
SyncConfiguration config = new SyncConfiguration.Builder(user, partition) .errorHandler((session, error) -> { // do some error handling }).build();
val user = app.currentUser() val config = SyncConfiguration.Builder(user, partition) .errorHandler { session, error -> // do some error handling } .build()
Tip
For a list of common Device Sync errors and how to handle them, refer to Sync Errors in the App Services Device Sync documentation.