Class DefaultWebClientErrorDecoder

java.lang.Object
org.bremersee.exception.webclient.DefaultWebClientErrorDecoder
All Implemented Interfaces:
Function<org.springframework.web.reactive.function.client.ClientResponse,reactor.core.publisher.Mono<? extends Throwable>>, WebClientErrorDecoder<org.bremersee.exception.RestApiResponseException>

public class DefaultWebClientErrorDecoder extends Object implements WebClientErrorDecoder<org.bremersee.exception.RestApiResponseException>
This web client error decoder generates a RestApiResponseException from the error response.
Author:
Christian Bremer
  • Constructor Details

    • DefaultWebClientErrorDecoder

      public DefaultWebClientErrorDecoder()
      Instantiates a new web client error decoder.
    • DefaultWebClientErrorDecoder

      public DefaultWebClientErrorDecoder(org.bremersee.exception.RestApiExceptionParser parser)
      Instantiates a new web client error decoder.
      Parameters:
      parser - the parser
  • Method Details

    • buildException

      public org.bremersee.exception.RestApiResponseException buildException(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response)
      Description copied from interface: WebClientErrorDecoder
      Build exception.
      Specified by:
      buildException in interface WebClientErrorDecoder<org.bremersee.exception.RestApiResponseException>
      Parameters:
      clientResponse - the client response
      response - the response
      Returns:
      the exception