Source:
<code>public StorageAccount buildStorageAccount(AzureClient client, StorageAccountParameters storageAccountParameters) { String resourceGroupName = storageAccountParameters.getResourceGroupName(); String storageAccountName = storageAccountParameters.getStorageAccountName(); try { String template = azureStorageAccountTemplateBuilder.build(storageAccountParameters); ResourceStatus templateDeploymentStatus = client.getTemplateDeploymentStatus(resourceGroupName, storageAccountName); LOGGER.debug("Template deployment status retrieved: {}.", templateDeploymentStatus); if (templateDeploymentStatus.isPermanent()) { LOGGER.debug("Creating template deployment."); String parameters = new Json(Map.of()).getValue(); Deployment templateDeployment = client.createTemplateDeployment(resourceGroupName, storageAccountName, template, parameters); LOGGER.debug("Created template deployment for storage account: {}", templateDeployment.exportTemplate().template()); } return client.getStorageAccountByGroup(resourceGroupName, storageAccountName); } catch (CloudException e) { <START> LOGGER.warn("Provisioning error, cloud exception happened: ", e); <END> if (e.body() != null && e.body().details() != null) { String details = e.body().details().stream().map(CloudError::message).collect(Collectors.joining(", ")); throw new CloudConnectorException(String.format("Storage account provisioning failed, status code %s, error message: %s, details: %s", e.body().code(), e.body().message(), details)); } else { throw new CloudConnectorException(String.format("Storage account provisioning failed: '%s', please go to Azure Portal for detailed message", e)); } } catch (Exception e) { String message = String.format("Could not create storage account %s in resource group %s", storageAccountName, resourceGroupName); LOGGER.warn(message, e); throw new CloudConnectorException(message); } }</code><technical_language>code in catch clause is extracted AzureUtils.convertToCloudConnectorException method. reuse that</technical_language>

Target:
public StorageAccount buildStorageAccount(AzureClient client, StorageAccountParameters storageAccountParameters) { String resourceGroupName = storageAccountParameters.getResourceGroupName(); String storageAccountName = storageAccountParameters.getStorageAccountName(); try { String template = azureStorageAccountTemplateBuilder.build(storageAccountParameters); ResourceStatus templateDeploymentStatus = client.getTemplateDeploymentStatus(resourceGroupName, storageAccountName); LOGGER.debug("Template deployment status retrieved: {}.", templateDeploymentStatus); if (templateDeploymentStatus.isPermanent()) { LOGGER.debug("Creating template deployment."); String parameters = new Json(Map.of()).getValue(); Deployment templateDeployment = client.createTemplateDeployment(resourceGroupName, storageAccountName, template, parameters); LOGGER.debug("Created template deployment for storage account: {}", templateDeployment.exportTemplate().template()); } return client.getStorageAccountByGroup(resourceGroupName, storageAccountName); } catch (CloudException e) { throw azureUtils.convertToCloudConnectorException(e, "Storage account creation"); } catch (Exception e) { String message = String.format("Could not create storage account %s in resource group %s", storageAccountName, resourceGroupName); LOGGER.warn(message, e); throw new CloudConnectorException(message); } }