Merge branch '6.1.x'
This commit is contained in:
@@ -232,13 +232,13 @@ final class DefaultRestClient implements RestClient {
|
||||
}
|
||||
throw unknownContentTypeException;
|
||||
}
|
||||
catch (UncheckedIOException | IOException | HttpMessageNotReadableException ex) {
|
||||
catch (UncheckedIOException | IOException | HttpMessageNotReadableException exc) {
|
||||
Throwable cause;
|
||||
if (ex instanceof UncheckedIOException uncheckedIOException) {
|
||||
if (exc instanceof UncheckedIOException uncheckedIOException) {
|
||||
cause = uncheckedIOException.getCause();
|
||||
}
|
||||
else {
|
||||
cause = ex;
|
||||
cause = exc;
|
||||
}
|
||||
RestClientException restClientException = new RestClientException("Error while extracting response for type [" +
|
||||
ResolvableType.forType(bodyType) + "] and content type [" + contentType + "]", cause);
|
||||
@@ -247,6 +247,12 @@ final class DefaultRestClient implements RestClient {
|
||||
}
|
||||
throw restClientException;
|
||||
}
|
||||
catch (RestClientException restClientException) {
|
||||
if (observation != null) {
|
||||
observation.error(restClientException);
|
||||
}
|
||||
throw restClientException;
|
||||
}
|
||||
finally {
|
||||
if (observation != null) {
|
||||
observation.stop();
|
||||
|
||||
Reference in New Issue
Block a user