title: Spring 5 Webclient throw exception in doAfterSuccessOrError
body: <p>I'm a java 7 developer (finally) taking his first steps in java 8.  A lot of these things are still new to me.  I'm trying to use the spring 5 WebClient since the documentation states RestTemplate will be moved away from in favor of WebClient.</p>
  
  <pre><code>        webClient
                  .method(HttpMethod.POST)
                  .uri(uriBuilder -&gt; uriBuilder.pathSegment("api", "payments").build())
                  .body(BodyInserters.fromObject(createPostRequest(paymentConfirmationData)))
                  .accept(MediaType.APPLICATION_JSON)
                  .exchange()
                  .doAfterSuccessOrError((clientResponse, throwable) -&gt; {
                      if (clientResponse.statusCode().is5xxServerError()
                          || clientResponse.statusCode().is4xxClientError()) {
                           logger.error("POST request naar orchestration layer mislukt, status: [{}]", clientResponse.bodyToMono(String.class));
                           Mono.error(throwable);
                      } else {
                          logger.error("POST request naar orchestration layer gelukt");
                      }
                  })
                  .block();
  </code></pre>
  
  <p>I'm trying to throw an exception in the .doAfterSuccesOrError.  However I can't use throw throwable cause then it just adds a try catch around it.  I read a few articles and this is my last attempt by adding Mono.error(throwable) but since there is no return I'm pretty sure this is the reason there is no effect.</p>
  
  <p>This is a POST call that returns a 204 No Content on success.  At the moment I'm getting a 422 although that shouldn't be important in this particular issue.</p>
  
  <p>Can someone teach me how to throw exceptions back to the calling environment ?</p>