Update createException example for WebClient
Closes gh-27645
This commit is contained in:
parent
2a5713f389
commit
8b89128c7b
|
|
@ -530,7 +530,7 @@ public interface WebClient {
|
|||
* return response.bodyToMono(ErrorContainer.class);
|
||||
* }
|
||||
* else {
|
||||
* return Mono.error(response.createException());
|
||||
* return response.createException();
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
|
|
@ -562,7 +562,7 @@ public interface WebClient {
|
|||
* return response.bodyToMono(ErrorContainer.class).flux();
|
||||
* }
|
||||
* else {
|
||||
* return Flux.error(response.createException());
|
||||
* return response.createException().flux();
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ depending on the response status:
|
|||
}
|
||||
else {
|
||||
// Turn to error
|
||||
return response.createException().flatMap(Mono::error);
|
||||
return response.createException();
|
||||
}
|
||||
});
|
||||
----
|
||||
|
|
|
|||
Loading…
Reference in New Issue