Description
Affects: <spring webflux 6.1.2>
The problem occurs defining a rest service in a webflux application, the service generates a Flux, and if an error occurs when processing it in an element (except the first one) there is no response of the server.
I created this demo to reproduce the problem. This publishes 3 services:
- /srvError1 -> fails processing the second element of the Flux
- /srvError2 -> fails processing the fist element of the Flux
- /srvOk -> without errors
Running the following requests:
-
curl --location --request GET 'http://localhost:8080/srvError1'
->
curl: (18) transfer closed with outstanding read data remaining
-
curl --location --request GET 'http://localhost:8080/srvError2'
->
{"timestamp":1705509733343,"path":"/srvError2","status":500,"error":"Internal Server Error","requestId":"764d728a-5"}
-
curl --location --request GET 'http://localhost:8080/srvOk'
->
[1,2,3]
The responses of the services srvError
should be the same.