in aws-route53recoveryreadiness-cell/src/main/java/software/amazon/route53recoveryreadiness/cell/CreateHandler.java [56:76]
private GetCellResponse preExistenceCheckCell(
final GetCellRequest awsRequest,
final ProxyClient<Route53RecoveryReadinessClient> proxyClient ) {
GetCellResponse response;
try {
response = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::getCell);
} catch (Route53RecoveryReadinessException e) {
if (e.statusCode() == 404) {
//expected not to find
logger.log(String.format("%s not found.", awsRequest.cellName()));
} else if (e.statusCode() == 409) {
throw new CfnAlreadyExistsException(ResourceModel.TYPE_NAME, awsRequest.cellName());
} else
throw new CfnGeneralServiceException( ResourceModel.TYPE_NAME, e);
} catch ( AwsServiceException e) {
throw new CfnGeneralServiceException( ResourceModel.TYPE_NAME, e);
}
return null;
}