File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
api/src/main/java/com/getcode/network Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import com.getcode.network.repository.TransactionRepository
14
14
import com.getcode.utils.network.NetworkConnectivityListener
15
15
import com.getcode.network.service.ChatService
16
16
import com.getcode.network.service.DeviceService
17
+ import com.getcode.utils.ErrorUtils
17
18
import dagger.hilt.android.qualifiers.ApplicationContext
18
19
import kotlinx.coroutines.CoroutineScope
19
20
import kotlinx.coroutines.Dispatchers
@@ -85,10 +86,13 @@ class Client @Inject constructor(
85
86
86
87
private suspend fun poll () {
87
88
if (networkObserver.isConnected) {
88
- balanceController.fetchBalanceSuspend()
89
- exchange.fetchRatesIfNeeded()
90
- fetchLimits()
91
- fetchPrivacyUpgrades()
89
+ try {
90
+ balanceController.fetchBalanceSuspend()
91
+ exchange.fetchRatesIfNeeded()
92
+ } catch (e: Exception ) {
93
+ ErrorUtils .handleError(e)
94
+ }
95
+ fetchLimits().andThen(fetchPrivacyUpgrades()).blockingSubscribe()
92
96
}
93
97
}
94
98
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ object DeviceCheck: CoroutineScope by CoroutineScope(Dispatchers.IO) {
114
114
onIdentifier(Result .success(it.visitorId)) },
115
115
errorListener = {
116
116
val error = Throwable (" Device Check failed:: ${it.description} " )
117
- ErrorUtils .handleError(error)
117
+ // ErrorUtils.handleError(error)
118
118
// onIdentifier(Result.failure(error))
119
119
onIdentifier(Result .success(null ))
120
120
}
Original file line number Diff line number Diff line change @@ -371,7 +371,6 @@ class IdentityRepository @Inject constructor(
371
371
372
372
IdentityService .GetTwitterUserResponse .Result .NOT_FOUND -> {
373
373
val error = TwitterUserFetchError .NotFound ()
374
- ErrorUtils .handleError(error)
375
374
Result .failure(error)
376
375
}
377
376
You can’t perform that action at this time.
0 commit comments