hikkidev
08/24/2020, 8:40 AMHttpCallValidator
in v1.4.0 ? DoubleReceiveException
val client = HttpClient(OkHttp) {
expectSuccess = false
install(HttpCallValidator) {
validateResponse { response -> throw RuntimeException("Response not valid") }
}
}
@Throws(RuntimeException::class)
suspend fun myBestRequest(): MyResponseObj = client.get {...}
Why can't I catch the error? In version 1.3.2 this worked.
try {
val response = myBestRequest()
Result.success(response)
} catch (cause: Throwable) {
Result.failure(cause)
}
cy
08/24/2020, 12:22 PMe5l
08/24/2020, 12:42 PM