From 40acb67ceb4b39c5e23c32df82f5cad556495fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Fri, 10 Jan 2020 16:44:54 +0100 Subject: [PATCH] [Errors] Fix Timeout error detection (SocketTimeoutException inherits from InterruptedIOException). --- .../java/pl/szczodrzynski/edziennik/data/api/models/Data.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/models/Data.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/models/Data.kt index 992d6f23..24949849 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/models/Data.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/models/Data.kt @@ -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()) {