Skip to content

Commit

Permalink
Merge pull request #25714 from felipewind/fix-guide-rest-client-react…
Browse files Browse the repository at this point in the history
…ive-exception-handling

Fix Guide Rest Client Reactive Exception Handling
  • Loading branch information
geoand authored May 22, 2022
2 parents 263941c + edc3765 commit 20a7686
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/main/asciidoc/rest-client-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,10 @@ A simple example of implementing such a `ResponseExceptionMapper` for the `Exten

[source, java]
----
public interface MyResponseExceptionMapper implements ResponseExceptionMapper<RuntimeException> {
public class MyResponseExceptionMapper implements ResponseExceptionMapper<RuntimeException> {
RuntimeException toThrowable(Response response) {
@Override
public RuntimeException toThrowable(Response response) {
if (response.getStatus() == 500) {
throw new RuntimeException("The remote service responded with HTTP 500");
}
Expand Down

0 comments on commit 20a7686

Please sign in to comment.