Merge branch '5.3.x'
This commit is contained in:
@@ -195,13 +195,7 @@ class DefaultClientResponse implements ClientResponse {
|
||||
|
||||
@Override
|
||||
public Mono<WebClientResponseException> createException() {
|
||||
return DataBufferUtils.join(body(BodyExtractors.toDataBuffers()))
|
||||
.map(dataBuffer -> {
|
||||
byte[] bytes = new byte[dataBuffer.readableByteCount()];
|
||||
dataBuffer.read(bytes);
|
||||
DataBufferUtils.release(dataBuffer);
|
||||
return bytes;
|
||||
})
|
||||
return bodyToMono(byte[].class)
|
||||
.defaultIfEmpty(EMPTY)
|
||||
.onErrorReturn(ex -> !(ex instanceof Error), EMPTY)
|
||||
.map(bodyBytes -> {
|
||||
|
||||
Reference in New Issue
Block a user