diff --git a/sources/Android/android-communications/library/src/sdk/java/com/polar/sdk/impl/BDBleApiImpl.kt b/sources/Android/android-communications/library/src/sdk/java/com/polar/sdk/impl/BDBleApiImpl.kt index 579b63b2..2faf5b76 100644 --- a/sources/Android/android-communications/library/src/sdk/java/com/polar/sdk/impl/BDBleApiImpl.kt +++ b/sources/Android/android-communications/library/src/sdk/java/com/polar/sdk/impl/BDBleApiImpl.kt @@ -1520,8 +1520,10 @@ class BDBleApiImpl private constructor(context: Context, features: Set + return Completable.defer { try { + BleLogger.d(TAG, "doFirstTimeUse(identifier: $identifier): started") + val session = sessionPsFtpClientReady(identifier) val client = session.fetchClient(BlePsFtpUtils.RFC77_PFTP_SERVICE) as BlePsFtpClient? ?: throw PolarServiceNotAvailable() @@ -1537,7 +1539,7 @@ class BDBleApiImpl private constructor(context: Context, features: Set emitter.onError(error) } - ) + .doOnError { error -> + BleLogger.e(TAG, "doFirstTimeUse(identifier: $identifier): error $error") + } } catch (error: Throwable) { - BleLogger.e(TAG, "doConfig() error: $error") - emitter.onError(error) + BleLogger.e(TAG, "doFirstTimeUse(identifier: $identifier): error $error") + return@defer Completable.error(error) } } }