-
Couldn't load subscription status.
- Fork 38.8k
Description
Affects: 6.1.10
org.springframework.web.client.DefaultRestClient:
If a response cannot be parsed (readWithMessageConverters), a RestClientException (or a subclass) gets thrown instead of the specific subclass RestClientResponseException, making the original responseBody and statusCode very hidden in nested causes.
In such cases a RestClientResponseException should be thrown, so that there is a clean API for getting the statusCode and the original responseBody.
Common base class for exceptions that contain actual HTTP response data.
spring-framework/spring-web/src/main/java/org/springframework/web/client/DefaultRestClient.java
Line 202 in 4a099d2
| private <T> T readWithMessageConverters(ClientHttpResponse clientResponse, Runnable callback, Type bodyType, |