And Introduce Detail Purpose When Response Could Not Extract

https://github.com/spring-projects/spring-framework/issues/24964

Comment From: devinabyss

@devinabyss I'm not sure we need to expand with 3 new exceptions. Just one RestClientResponseException to replace the "no suitable HttpMessageConverter" case.

sorry about no more discuss about that on issue thread.

RestClientResponseException.FailedToReadResponseBody arises when converter body extracting failed. you first mentioned case on issue thread.

After modifying the RestClientResponseException.MessageConverterNotFound, I thought that preserving the rest of the information (headers, specific 2xx status) is intentionally right, although in the sense of preserving the information of response, of course the body is impossible.

Can I just keep RestClientResponseException.MessageConverterNotFound?

Comment From: rstoyanchev

Can I just keep RestClientResponseException.MessageConverterNotFound?

I don't see the value. It's not something that can be handled and it's in the root cause.

Comment From: rstoyanchev

I've resolved this by adding an UnknownContentTypeException sub-class. Thanks for the PR in any case.

Comment From: devinabyss

thanks. sorry for my reaction was late.