-
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
HttpMediaTypeNotAcceptableException exception missing when using ContentNegotiationConfigurer #26742
Comments
I'm not sure this setup is valid; Are you testing the Error Controller provided by Spring Boot or a custom controller? We can't think of a recent change that might provoke this, we'll need more information on this. |
I'm testing this on the default
|
Still no opinions on this? |
Unfortunately, no. It's not even clear if the issue is located in Spring Boot or Spring Framework. In the lack of a sample that reproduces the problem, and given those versions are EOL now, I am going to close this issue. I am sorry this got overlooked, and we can obviously reopen if you can share a small sample that reproduces the problem with a supported version. |
@snicoll See working example attached, with latest Still the problem is that |
I am trying to understand what you're trying to show and the test fails even if I remove the |
I just want to show that my test succeeds in As written, the problem for |
I have tracked this down to the following change: #24539 The exception handling is now more lenient and this was done on purpose. If I understand correctly, a test was previously catching that (and actually testing the Framework behavior). I would suggest removing this assertion as a result since the behavior changed on purpose. I'm closing this issue as a result. Thanks! |
I have a test that worked in
2.4.3
, but fails since2.4.4.
.Thus I assume there has been a change, but I don't know where.
It certainly has to do with
ContentNegotiationConfigurer
when setting a customparameterName("_format")
and usingdefaultContentType(MediaType.APPLICATION_JSON)
.I was not able to locate the change that introduced this. Neither am I sure if the former or later outcome is the correct one. But I think the
HttpMediaTypeNotAcceptableException
should not be swallowed (like now in 2.4.4.)The text was updated successfully, but these errors were encountered: