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

Sergioedcigreja

09/19/2019, 9:00 AM
Hello Guys.. my API Wrapper was working well until a few days ago where I started getting this exception out of nowhere. Any ideas on what's causing this? Ktor version being used is 1.2.2 An unknown exception was caught. io.ktor.client.call.NoTransformationFoundException: No transformation found: class kotlinx.coroutines.io.ByteBufferChannel (Kotlin reflection is not available) -> class fyi.exceptions.ErrorResponse (Kotlin reflection is not available)
e

e5l

09/19/2019, 9:01 AM
Hi @Sergioedcigreja, did you configure response validation or
expectSuccess
?
s

Sergioedcigreja

09/19/2019, 9:02 AM
Untitled
e

e5l

09/19/2019, 9:03 AM
Json
feature works only when the
Content-Type
header with
application/json
exists
Could you check if you receive it?
s

Sergioedcigreja

09/19/2019, 9:07 AM
from the server? I sent the request with insomnia and this is the header
Solved it by replacing call.receive<SerializableClass> to instead doing it with kotlinxserialization Json class