https://kotlinlang.org logo
#ktor
Title
# ktor
b

brabo-hi

04/23/2022, 9:58 PM
Hi, all it looks like with
ktor-2.0
handleResponseException has been deprecated in replacement of
handleResponseExceptionWithRequest
. However i am having exception when accessing
request.call.response.status
Copy code
val client = HttpClient {
 expectSuccess = true
        HttpResponseValidator {
            handleResponseExceptionWithRequest { exception, request ->
                request.call.response.status //  throw kotlin.UninitializedPropertyAccessException: lateinit property response has not been initialized
}
}
}
a

Aleksei Tirman [JB]

04/25/2022, 8:37 PM
This is a bug so I’ve created an issue.
1
61 Views