Hello everyone, For some unknown and random reason...
# ktor
a
Hello everyone, For some unknown and random reason, sometimes my ktor client returns a
Parent Job is Completed error
. My project is a server, where I use ktor as a server for routing, and as a client to make calls. So sometimes the http calls are in 200 but I get a Parent Job is Completed exception. The httpClient is injected into the api classes by koin Do you know where this might be coming from?
This is simple requests (code is generated via openApi file) :
Copy code
open suspend fun updateArticle(id: kotlin.String, articleUpdateDto: ArticleUpdateDto): HttpResponse {
        val body = articleUpdateDto
        return client.request {
            method = HttpMethod.Put
            url {
                path("/v1/articles/{id}".replace("{" + "id" + "}", "$id"))
            }
            headers {
            }
            setBody(body)

        }
    }
a
How often does the error occur? Can you share a self-contained (without unresolved symbols) code snippet to reproduce the problem?
a
After updating to ktor3, and a few optimizations, I no longer have the problem 🙈
👍 1