Skip to content
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

Revisit CodecException vs ResponseStatusException in DecoderHttpMessageReader [SPR-15516] #20075

Closed
spring-projects-issues opened this issue May 4, 2017 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 4, 2017

Juergen Hoeller opened SPR-15516 and commented

DecoderHttpMessageWriter as well as EncoderHttpMessageReader in http.codec use ResponseStatusException which lives in web.server, creating a cyclic package dependency.

We should be throwing a different exception to indicate "bad request" there, e.g. a DecodingException subclass of CodecException, to be eventually translated to HTTP status 400 in AbstractMessageReaderArgumentResolver.


Affects: 5.0 RC1

Issue Links:

Referenced from: commits 4fdd853, 4d962a1, 83e0e16

@spring-projects-issues
Copy link
Collaborator Author

Sébastien Deleuze commented

Good catch, I missed the cyclic dependency. This new implementation works for me, this was an alternative way to implement that I considered at some point. I have checked RC1 with a demo project and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants