Retain order of produces media types in @ExceptionHandler#35587
Retain order of produces media types in @ExceptionHandler#35587IMurzich wants to merge 2 commits intospring-projects:6.2.xfrom
produces media types in @ExceptionHandler#35587Conversation
produces media types in @ExceptionHandler
|
Hi @IMurzich, Congratulations on submitting your first PR for the Spring Framework! 👍 However, before we process this PR, we need to take care of the following.
Regarding point # 1, I realize you added some text to this issue's description, but it is not fully clear to me what you mean. So, perhaps you can just expound on that. Thanks |
|
Hi @sbrannen, I've added test. Please check it. Thanks. |
|
Purpose of change: I have a controller and exception handler in it. My REST service can return JSON or XML replies. Therefore I want to return exceptions in JSON or XML too. Exception handler is annotated with: @ExceptionHandler(exception = Exception.class, produces = {"application/json", "application/xml"})And I expect to get JSON response with error ( |
|
@IMurzich, can you please sign off your commits so that the Developer Certificate of Origin (DCO) check passes? Thanks |
|
@IMurzich please sign the DCO. You can do that with by issuing the following commands on your fork: |
cf5eefd to
625a918
Compare
Signed-off-by: Igor Murzich <imurzich@gmail.com>
Signed-off-by: Igor Murzich <imurzich@gmail.com>
625a918 to
6057763
Compare
Closes gh-35587 Signed-off-by: Igor Murzich <imurzich@gmail.com>
|
Fixed via 7699b4a |
Fix error when corrupt order of
producesmedia types for@ExceptionHandler.For example, the following returns xml by default.