- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Description
While working on ProblemDetail support for error views in Spring Boot (See spring-projects/spring-boot#19525), I have noticed that the org.springframework.web.reactive.result.method.annotation.ResponseEntityExceptionHandler handles all NoResourceFoundException instances as Problem Detail JSON/XML responses.
This exception is thrown for all 404s in the application, meaning that a browser requesting a missing page will always get a JSON response.
In the current error handling support for Spring Boot, the application can contribute an ErrorWebExceptionHandler which can render errors as JSON payloads or HTML views. Because it is ordered after the ResponseEntityExceptionHandler, there is no chance for Spring Boot to render HTML error pages for 404s.
I don't think there is a way to really understand the intent of the client here in Spring Framework. Spring Boot does that by checking that the client requests "text/html" explicitly.
This is an important change to consider in 6.2.x, but I'm wondering how we can unlock this use case for Spring Boot. Isn't handling