I am seeing this behavior again https://github.com/spring-projects/spring-boot/issues/28953 . In version 2.6.7

Comment From: bclozel

As requested by Phil in the linked issue, please provide a sample application we can run and debug (attached as a zip, or a link to a GitHub project). Without it, there is no way for us to make progress here.

Comment From: grojas123

Here the code . https://github.com/grojas123/ResponseStatusException31091 . Simply test curl http://localhost:8080/hello with version 2.6.7 no response at all curl http://localhost:8080/hello with version 2.5.6 {"timestamp":"2022-05-18T15:01:17.531+00:00","status":401,"error":"Unauthorized","path":"/hello"}

Comment From: mbhave

@grojas123 That is the expected behavior that is a result of the bug fix in #26356. The /error page requires authenticated access by default and in this case you aren't passing any credentials.

28953 was a different issue because it wasn't returning the response body even for authorized users.

If you'd like to allow unauthenticated access to the error page, you can do so by explicitly adding permitAll() for/errorin aSecurityFilterChain` bean.

Comment From: grojas123

@mbhave Thank you .