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
* Subclass of {@link ErrorResponseException} that accepts a "reason" and maps
* it to the "detail" property of {@link org.springframework.http.ProblemDetail}.
But when I set a reason, the detail is always null. It seems the class is missing getBody().setDetail(getReason());.
Or maybe this is an issue in the javadoc?
Or am I missing something?
The text was updated successfully, but these errors were encountered:
This was the case, but was removed when adding tests for all sub-classes, with the idea that the reason isn't always what should be present to the outside world.
What I think it should say, and work, is that it uses the reason as the detail by default, but sub-classes can set the detail to something else if needed.
rstoyanchev
changed the title
ResponseStatusException not working correctly
ResponseStatusException does not use the reason to set the "detail" field
Nov 24, 2022
Affects: 6.0
The javadoc for the ResponseStatusException is
But when I set a reason, the detail is always null. It seems the class is missing
getBody().setDetail(getReason());
.Or maybe this is an issue in the javadoc?
Or am I missing something?
The text was updated successfully, but these errors were encountered: