Skip to content

Commit

Permalink
Update createException example for WebClient
Browse files Browse the repository at this point in the history
Closes gh-27645
  • Loading branch information
rstoyanchev committed Dec 2, 2021
1 parent 2a5713f commit 8b89128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
* return response.bodyToMono(ErrorContainer.class);
* }
* else {
* return Mono.error(response.createException());
* return response.createException();
* }
* });
* </pre>
Expand Down Expand Up @@ -562,7 +562,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
* return response.bodyToMono(ErrorContainer.class).flux();
* }
* else {
* return Flux.error(response.createException());
* return response.createException().flux();
* }
* });
* </pre>
Expand Down
2 changes: 1 addition & 1 deletion src/docs/asciidoc/web/webflux-webclient.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ depending on the response status:
}
else {
// Turn to error
return response.createException().flatMap(Mono::error);
return response.createException();
}
});
----
Expand Down

0 comments on commit 8b89128

Please sign in to comment.