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:
#18170 HttpMessageConverterExtractor should wrap HttpMessageNotReadableException in RestClientExceptions
#19918 Return 5xx/4xx status code and print the reason in logs for CodecException
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.
Juergen Hoeller opened SPR-15516 and commented
DecoderHttpMessageWriter
as well asEncoderHttpMessageReader
inhttp.codec
useResponseStatusException
which lives inweb.server
, creating a cyclic package dependency.We should be throwing a different exception to indicate "bad request" there, e.g. a
DecodingException
subclass ofCodecException
, to be eventually translated to HTTP status 400 inAbstractMessageReaderArgumentResolver
.Affects: 5.0 RC1
Issue Links:
Referenced from: commits 4fdd853, 4d962a1, 83e0e16
The text was updated successfully, but these errors were encountered: