Hi, after trying to upgrade from `2.0.1` to `2.0.2...
# ktor
d
Hi, after trying to upgrade from
2.0.1
to
2.0.2
my tests using
externalServices
started failing. Any experience of that kind?
e
Hi @dodalovic, could you share a sample?
d
Unfortunately, this is my clients code, so can't do it. I saw this ticket https://youtrack.jetbrains.com/issue/KTOR-4373 that may have to do something with it
some mocked services started producing
406
instead of following given instructions
e
@Rustam Siniukov do you have any ideas?
d
We're using
Copy code
"io.ktor.server.cio.EngineMain"
if of any importance
With
gradle.properties
Copy code
ktor_version=2.0.1
kotlin_version=1.6.20
logback_version=1.2.11
kotlin.code.style=official
kotlinresult_version=1.1.14
a
Is it possible to at least trace from where 406 status code is returned? There are two places here and here.
d
If I knew how, yes
a
You can set breakpoints on those two lines of code, run your tests in the debug mode and then copy a stack trace.
d
Untitled.txt
a
Seems like the 406 is returned because the body wasn’t transformed to
OutgoingContent
in the
ApplicationSendPipeline.Render
and
ApplicationSendPipeline.Transform
phases.
d
req / response body?
a
Response body
r
Probably it’s not related to external services, but one of the fixes around
ContentNegotiation
/`DefaultTransform` .
Please create a simplified snippet of your code
d
I'll try to do it