in aws-route53recoverycontrol-safetyrule/src/main/java/software/amazon/route53recoverycontrol/safetyrule/UpdateHandler.java [88:107]
private DescribeSafetyRuleResponse getSafetyRule(
DescribeSafetyRuleRequest request,
ProxyClient<Route53RecoveryControlConfigClient> proxyClient
) {
DescribeSafetyRuleResponse response;
try {
response = proxyClient.injectCredentialsAndInvokeV2(request, ClientBuilder.getClient()::describeSafetyRule);
} catch (Route53RecoveryControlConfigException e) {
if (e.statusCode() == 404) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME,
request.safetyRuleArn(), e);
} else
throw new CfnGeneralServiceException(request.safetyRuleArn(), e);
} catch (final AwsServiceException e) {
throw new CfnGeneralServiceException(request.safetyRuleArn(), e);
}
return response;
}