Inconsistent error response when problemdetails enabled #33885
Labels
status: pending-design-work
Needs design work before any code can be developed
theme: web-error-handling
type: enhancement
A general enhancement
Milestone
Affects: Boot 3.0.1, Framework 6.0.3
With the current version (Boot 3.0.1, Framework 6.0.3), if Problem Details are enabled (
spring.mvc.problemdetails.enabled=true
) and if I throw out an error from an MVC controller method, sometimes I get a Problem Details response, sometimes I get the "old" (Boot 2.x, Framework 5.x) response format depending on the default error handler "knows" the exception or not.When I throw
IllegalStateException
When I throw
ResponseStatusException
I think the expected behavior would be a consistent response format;
application/problem+json
if problem details enabled and the old (5.x)application/json
format if not.The text was updated successfully, but these errors were encountered: