Skip to content

None response when a flux fails processing an element of a rest service in webflux #32046

Closed as not planned
@ceremo

Description

@ceremo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions