WIP: WebClient -- Syntax vereinfacht
authorKai Moritz <kai@jupl.de>
Thu, 21 Nov 2019 20:02:47 +0000 (21:02 +0100)
committerKai Moritz <kai@jupl.de>
Thu, 21 Nov 2019 20:02:47 +0000 (21:02 +0100)
src/test/java/de/juplo/facebook/errors/GraphApiExchangeFilterFunctionIntegrationTest.java

index 27795f9..8614735 100644 (file)
@@ -140,10 +140,12 @@ public class GraphApiExchangeFilterFunctionIntegrationTest
             {
               return
                   HttpStatus.Series.CLIENT_ERROR.equals(response.statusCode().series())
-                      ? response.bodyToMono(String.class).flatMap(errorBody ->
-                        {
-                          return Mono.error(GraphApiException.create(response.statusCode(), response.headers().asHttpHeaders(), errorBody.getBytes()));
-                        })
+                      ? response
+                          .bodyToMono(String.class)
+                          .flatMap(errorBody -> Mono.error(GraphApiException.create(
+                              response.statusCode(),
+                              response.headers().asHttpHeaders(),
+                              errorBody.getBytes())))
                       : Mono.just(response);
             });
   }