diff --git a/app/src/main/java/foundation/e/apps/data/gplay/utils/GPlayHttpClient.kt b/app/src/main/java/foundation/e/apps/data/gplay/utils/GPlayHttpClient.kt index 38fb0ad2277b2460d6531b276f3f8b1705781cf6..acb44e965307d9bd3935c45e514cec46a8b363e1 100644 --- a/app/src/main/java/foundation/e/apps/data/gplay/utils/GPlayHttpClient.kt +++ b/app/src/main/java/foundation/e/apps/data/gplay/utils/GPlayHttpClient.kt @@ -55,6 +55,7 @@ class GPlayHttpClient @Inject constructor( private const val HTTP_TIMEOUT_IN_SECOND = 10L private const val SEARCH = "search" private const val SEARCH_SUGGEST = "searchSuggest" + private const val STATUS_CODE_OK = 200 private const val STATUS_CODE_UNAUTHORIZED = 401 private const val STATUS_CODE_TOO_MANY_REQUESTS = 429 const val STATUS_CODE_TIMEOUT = 408 @@ -206,7 +207,7 @@ class GPlayHttpClient @Inject constructor( } } - if (code != 200) { + if (code !in listOf(STATUS_CODE_OK, STATUS_CODE_UNAUTHORIZED)) { throw GplayHttpRequestException(code, response.message) }