Package org.springframework.credhub.core
Class ExceptionUtils
java.lang.Object
org.springframework.credhub.core.ExceptionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static voidthrowExceptionOnError(ResponseEntity<?> response) Helper method to throw an appropriate exception if a request to CredHub returns with an error code.
-
Method Details
-
throwExceptionOnError
Helper method to throw an appropriate exception if a request to CredHub returns with an error code.- Parameters:
response- aResponseEntityreturned fromRestTemplate
-
buildError
Helper method to return an appropriate error if a request to CredHub returns with an error code.- Parameters:
response- aClientResponsereturned fromWebClient- Returns:
- the generated error
-