Skip to content

WebFlux: @ResponseStatus does not work out of the box, but ResponseStatusException does #14742

@mmanciop

Description

@mmanciop

As documented in https://github.com/mmanciop/response-status-repro, @ResponseStatus does not work out of the box with WebFlux applications, but ResponseStatusException does.

I think ResponseStatusException works and not @ResponseStatus due to org.springframework.boot.web.reactive.error.DefaultErrorAttributes#determineHttpStatus and other methods.

I truly cannot tell if this is by design or by oversight. Would it make sense for me to open a PR and add @ResponseStatus support to org.springframework.boot.web.reactive.error.DefaultErrorAttributes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions