in aws-route53recoverycontrol-cluster/src/main/java/software/amazon/route53recoverycontrol/cluster/DeleteHandler.java [83:102]
private DescribeClusterResponse describeCluster (
DescribeClusterRequest request,
ProxyClient<Route53RecoveryControlConfigClient> proxyClient
) {
DescribeClusterResponse response;
try {
response = proxyClient.injectCredentialsAndInvokeV2(request, ClientBuilder.getClient()::describeCluster);
} catch (Route53RecoveryControlConfigException e) {
if (e.statusCode() == 404) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME,
request.clusterArn(), e);
} else
throw new CfnGeneralServiceException(request.clusterArn(), e);
} catch (final AwsServiceException e) {
throw new CfnGeneralServiceException(request.clusterArn(), e);
}
return response;
}