Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on May 10, 2017

    @spring-projects-issues
    CollaboratorAuthor

    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.

  2. added
    in: web
    type: task
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: task

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions