in aws-route53recoverycontrol-safetyrule/src/main/java/software/amazon/route53recoverycontrol/safetyrule/CreateHandler.java [81:100]
private DescribeRoutingControlResponse getRoutingControl(
DescribeRoutingControlRequest request,
ProxyClient<Route53RecoveryControlConfigClient> proxyClient
) {
DescribeRoutingControlResponse response;
try {
response = proxyClient.injectCredentialsAndInvokeV2(request, ClientBuilder.getClient()::describeRoutingControl);
} catch (Route53RecoveryControlConfigException e) {
if (e.statusCode() == 404) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME,
request.routingControlArn(), e);
} else
throw new CfnGeneralServiceException(request.routingControlArn(), e);
} catch (final AwsServiceException e) {
throw new CfnGeneralServiceException(request.routingControlArn(), e);
}
return response;
}