-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check ResponseStatusException reason as MessageSource code for ProblemDetail #30300
Conversation
spring-web/src/main/java/org/springframework/web/server/ResponseStatusException.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that reason
may or may not be a message code, and this change suppresses the default message code determination. Is there a reason you can't use the default message code, i.e. problemDetail.org.springframework.web.ErrorResponseException
, or otherwise creating a dedicated sub-class also allows you to set the message code and arguments?
I'm trying to fix the inconsistency in boot spring-projects/spring-boot#34791 |
The referenced Boot issue was closed because the issue can't be addressed on the Boot side, so I don't know what you mean. Here I'm saying that the PR in its present form can't go forward because it assumes the Whatever the solution, it would need to be much more explicit about passing a message code, but again I'm wondering whether switching to the default message code would work for you. |
@rstoyanchev I updated the commit that will break nothing just enhancement, please review it. |
@rstoyanchev Could you take a look? |
…a MessageSource Closes spring-projectsGH-30222
Apologies for the delay. Yes, if used as a fallback it should work. |
I have moved the change down to |
detail in ProblemDetail will be localized
Closes GH-30222