Update createException example for WebClient

Closes gh-27645
This commit is contained in:
Rossen Stoyanchev 2021-12-02 11:53:43 +00:00
parent 2a5713f389
commit 8b89128c7b
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -559,7 +559,7 @@ depending on the response status:
}
else {
// Turn to error
return response.createException().flatMap(Mono::error);
return response.createException();
}
});
----