mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
fix an issue when onboarding gets stuck in 421 loop when trying to fetch UserProfile config
This commit is contained in:
parent
410e298bca
commit
b0edfef6a9
@ -251,6 +251,10 @@ class Poller(private val configFactory: ConfigFactoryProtocol, debounceTimer: Ti
|
||||
responseList.getOrNull(personalResponseIndex)?.let { rawResponse ->
|
||||
if (rawResponse["code"] as? Int != 200) {
|
||||
Log.e("Loki", "Batch sub-request for personal messages had non-200 response code, returned code ${(rawResponse["code"] as? Int) ?: "[unknown]"}")
|
||||
// If we got a non-success response then the snode might be bad so we should try rotate
|
||||
// to a different one just in case
|
||||
pollNextSnode(deferred)
|
||||
return@bind Promise.ofSuccess(Unit)
|
||||
} else {
|
||||
val body = rawResponse["body"] as? RawResponse
|
||||
if (body == null) {
|
||||
|
@ -520,7 +520,7 @@ object SnodeAPI {
|
||||
Log.w("Loki", "response code was not 200")
|
||||
handleSnodeError(
|
||||
response["code"] as? Int ?: 0,
|
||||
response,
|
||||
response["body"] as? Map<*, *>,
|
||||
snode,
|
||||
publicKey
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user