mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Errors] Fix Timeout error detection (SocketTimeoutException inherits from InterruptedIOException).
This commit is contained in:
parent
3ae8100bda
commit
40acb67ceb
@ -366,8 +366,8 @@ abstract class Data(val app: App, val profile: Profile?, val loginStore: LoginSt
|
||||
apiError.errorCode = when (apiError.throwable) {
|
||||
is UnknownHostException -> ERROR_REQUEST_FAILURE_HOSTNAME_NOT_FOUND
|
||||
is SSLException -> ERROR_REQUEST_FAILURE_SSL_ERROR
|
||||
is InterruptedIOException, is ConnectException -> ERROR_REQUEST_FAILURE_NO_INTERNET
|
||||
is SocketTimeoutException -> ERROR_REQUEST_FAILURE_TIMEOUT
|
||||
is InterruptedIOException, is ConnectException -> ERROR_REQUEST_FAILURE_NO_INTERNET
|
||||
else ->
|
||||
if (apiError.errorCode == ERROR_REQUEST_FAILURE)
|
||||
when (apiError.response?.code()) {
|
||||
|
Loading…
Reference in New Issue
Block a user