You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default strategy for message codes follows the pattern: problemDetail.[type|title|detail].[fully qualified exception class name]
As you can see in the following references, detail is not used when searching for the message code. This does happen for problemDetail.title and problemDetail.type
ZeroCyan
changed the title
Mismatch between documented and actual message code handling for ErrorResponses
Mismatch between documented and actual message code handling for ErrorResponse
Mar 11, 2024
There is a discrepancy between the documentation and the actual implementation regarding the message codes for ErrorResponses.
https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-ann-rest-exceptions.html#mvc-ann-rest-exceptions-i18n describes the following pattern:
As you can see in the following references,
detail
is not used when searching for the message code. This does happen forproblemDetail.title
andproblemDetail.type
spring-framework/spring-web/src/main/java/org/springframework/web/ErrorResponse.java
Line 162 in 0435e9c
spring-framework/spring-web/src/main/java/org/springframework/web/ErrorResponse.java
Line 172 in 0435e9c
spring-framework/spring-web/src/main/java/org/springframework/web/ErrorResponse.java
Line 184 in 0435e9c
Expected message code according to documentation:
Actual message code that gets resolved
The text was updated successfully, but these errors were encountered: