When returning a ResponseEntity with a Flux while the function is suspended, it fails to encode the body #27809
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
theme: kotlin
An issue related to Kotlin support
type: regression
A bug that is also a regression
Milestone
Affects: 5.3.13
When returning a ResponseEntity<Flux<[some class]>> when the function is suspended it unnests to Flux<[some class]> (tested: 5.3.13) while it previously unnested to [some class] (tested: 5.3.11).
Example
This is due to the change in
org.springframework.web.reactive.result.method.annotation.ResponseEntityResultHandler
, where the functionhandleResult
was changed to handle coroutinescommit. It runsnested
once instead of twice, as it did before.Mixing reactor and coroutines is bad practice, I'd guess. Therefore, I'm not certain what the desired behaviour is. Any thoughts?
The text was updated successfully, but these errors were encountered: