code: public static void throwExceptionOnError(ResponseEntity<?> response) {
  		if (!response.getStatusCode().equals(HttpStatus.OK)) {
  			throw new CredHubException(response.getStatusCode());
  		}
  	}
docs: Helper method to throw an appropriate exception if a request to CredHub
  returns with an error code.
  
  @param response a {@link ResponseEntity} returned from {@link RestTemplate}