Fix error responses handling in WebClient
This commit fixes a typo in the `DefaultWebClient` implementation. Instead of forwarding resolved `WebClientException` instances as error signals, the `bodyToMono(ParameterizedTypeReference)` variant would just forward those exceptions as `onNext` signals. Issue: SPR-15946
This commit is contained in:
@@ -422,7 +422,7 @@ class DefaultWebClient implements WebClient {
|
||||
public <T> Mono<T> bodyToMono(ParameterizedTypeReference<T> typeReference) {
|
||||
return this.responseMono.flatMap(
|
||||
response -> bodyToMono(response, BodyExtractors.toMono(typeReference),
|
||||
mono -> (Mono<T>)mono));
|
||||
this::monoThrowableToMono));
|
||||
}
|
||||
|
||||
private <T> Mono<T> monoThrowableToMono(Mono<? extends Throwable> mono) {
|
||||
|
||||
Reference in New Issue
Block a user