Improve status code handling on WebFlux router predicates [SPR-17582] #22114
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
rodolphocouto opened SPR-17582 and commented
The request predicates were designed to return a boolean to match the request, so the WebFlux router engine always returns the same status code (404) when the predicate returns false.
The problem is that some predicates need custom responses, for example:
My suggestion is to redesign the RequestPredicate to be able to return customized responses to properly handle each HTTP status code.
Does it make sense?
Affects: 5.1.3
The text was updated successfully, but these errors were encountered: