Daniel Pitts
08/19/2025, 10:23 PM3.2.3
with SSE.
Caused by: kotlinx.serialization.SerializationException: Serializer for class 'ClientSSESession' is not found.
For some reason, the private suspend inline fun <reified T> HttpClient.processSession
method is trying to create a body of type ClientSSESession
, which seems wrong to me, but i don't really know.
statement.body<T, Unit> { session ->
sessionDeferred.complete(session)
}
Daniel Pitts
08/19/2025, 10:26 PMdefaultRequest {
url(baseUrl)
bearerAuth(apiKey)
contentType(ContentType.Application.Json)
}
install(ContentNegotiation) {
json(json)
}
install(SSE) {
Daniel Pitts
08/19/2025, 10:47 PM400 Bad Request
. For some reason, that caused ktor client to try to deserialize the response body as the ClientSSESession, which is not the correct behavior IMO. I don't see any obvious place to intercept response failures before the SSE kicks in.Aleksei Tirman [JB]
08/20/2025, 8:14 AMDaniel Pitts
08/20/2025, 2:10 PMDaniel Pitts
08/20/2025, 3:16 PMAleksei Tirman [JB]
08/21/2025, 8:52 AM