Class ExceptionUtils

java.lang.Object
org.springframework.credhub.core.ExceptionUtils

public final class ExceptionUtils extends Object
  • Method Details

    • throwExceptionOnError

      public static void throwExceptionOnError(ResponseEntity<?> response)
      Helper method to throw an appropriate exception if a request to CredHub returns with an error code.
      Parameters:
      response - a ResponseEntity returned from RestTemplate
    • buildError

      public static reactor.core.publisher.Mono<Throwable> buildError(ClientResponse response)
      Helper method to return an appropriate error if a request to CredHub returns with an error code.
      Parameters:
      response - a ClientResponse returned from WebClient
      Returns:
      the generated error