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 void
throwExceptionOnError
(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
- aResponseEntity
returned fromRestTemplate
-
buildError
Helper method to return an appropriate error if a request to CredHub returns with an error code.- Parameters:
response
- aClientResponse
returned fromWebClient
- Returns:
- the generated error
-