strindberg
11/20/2025, 8:31 AMCachingHeaders plugin. I have not been able to figure out where why the combination causes a stack trace, but it's clear that the combination doesn't work. I have reported it as a bug in in the ktor Youtrack (https://youtrack.jetbrains.com/issue/KTOR-9114/CachingHeaders-in-combination-with-Arrow-causes-stacktrace), but it could well be that the issue is on the Arrow side. I have made a very simple project demonstrating the issue here: https://github.com/strindberg/ktor-sample . I could also file an issue in arrow's github if appropriate.Alejandro Serrano.Mena
11/20/2025, 8:34 AMstrindberg
11/20/2025, 8:34 AMstrindberg
11/20/2025, 8:42 AMphldavies
11/20/2025, 9:29 AMpostOrRaise will respond with the successful result of the handler, which conflicts with the call the call.respond in the middle of the handlerphldavies
11/20/2025, 9:34 AMcall.respond(myHappyResponse)
raise(BadRequest("oh no"))
We could protect against this by checking call.isHandled before responding with either the raised or successful result, although I'd want to log a warning of misuse of the API in that case.phldavies
11/20/2025, 9:41 AM.let { call.respond(it) i.e.
postOrRaise("/error") {
withError({ errors -> BadRequest(payload = errors) }) {
getResult()
}
}
Should work as expectedstrindberg
11/20/2025, 1:38 PMpostOrRaise to work just like post in the routing code, and in regular (non-Arrow) routing, calling call.respond(...) is a common thing to do. Now I will change my code to use it as intended, but some kind of warning is probably warranted.strindberg
11/20/2025, 1:39 PM