Skip to content

Commit 1690ec5

Browse files
committed
Remove commented code
1 parent 55e9d8e commit 1690ec5

File tree

1 file changed

+0
-54
lines changed
  • aws-qbusiness-application/src/main/java/software/amazon/qbusiness/application

1 file changed

+0
-54
lines changed
Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
11
package software.amazon.qbusiness.application;
22

3-
import java.util.Optional;
4-
5-
import org.json.JSONObject;
6-
73
import software.amazon.awssdk.services.qbusiness.QBusinessClient;
8-
import software.amazon.awssdk.services.qbusiness.model.AccessDeniedException;
9-
import software.amazon.awssdk.services.qbusiness.model.ConflictException;
10-
import software.amazon.awssdk.services.qbusiness.model.QBusinessRequest;
114
import software.amazon.awssdk.services.qbusiness.model.GetApplicationRequest;
125
import software.amazon.awssdk.services.qbusiness.model.GetApplicationResponse;
136
import software.amazon.awssdk.services.qbusiness.model.ListTagsForResourceRequest;
147
import software.amazon.awssdk.services.qbusiness.model.ListTagsForResourceResponse;
15-
import software.amazon.awssdk.services.qbusiness.model.ResourceNotFoundException;
16-
import software.amazon.awssdk.services.qbusiness.model.ServiceQuotaExceededException;
17-
import software.amazon.awssdk.services.qbusiness.model.ThrottlingException;
18-
import software.amazon.awssdk.services.qbusiness.model.ValidationException;
198
import software.amazon.awssdk.utils.StringUtils;
20-
import software.amazon.cloudformation.exceptions.BaseHandlerException;
21-
import software.amazon.cloudformation.exceptions.CfnAccessDeniedException;
22-
import software.amazon.cloudformation.exceptions.CfnGeneralServiceException;
23-
import software.amazon.cloudformation.exceptions.CfnInvalidRequestException;
24-
import software.amazon.cloudformation.exceptions.CfnNotFoundException;
25-
import software.amazon.cloudformation.exceptions.CfnResourceConflictException;
26-
import software.amazon.cloudformation.exceptions.CfnServiceLimitExceededException;
27-
import software.amazon.cloudformation.exceptions.CfnThrottlingException;
289
import software.amazon.cloudformation.proxy.AmazonWebServicesClientProxy;
2910
import software.amazon.cloudformation.proxy.Logger;
3011
import software.amazon.cloudformation.proxy.ProgressEvent;
@@ -71,39 +52,4 @@ protected GetApplicationResponse getApplication(ResourceModel model, ProxyClient
7152
GetApplicationRequest getApplicationRequest = Translator.translateToReadRequest(model);
7253
return proxyClient.injectCredentialsAndInvokeV2(getApplicationRequest, proxyClient.client()::getApplication);
7354
}
74-
75-
/* protected ProgressEvent<ResourceModel, CallbackContext> handleError(
76-
QBusinessRequest qBusinessRequest,
77-
ResourceModel resourceModel,
78-
Exception error,
79-
CallbackContext context,
80-
Logger logger,
81-
String apiName
82-
) {
83-
logger.log("[ERROR] Failed Request: %s. Error Message: %s".formatted(apiName, error.getMessage()));
84-
BaseHandlerException cfnException;
85-
86-
var primaryIdentifier = Optional.ofNullable(resourceModel)
87-
.map(ResourceModel::getPrimaryIdentifier)
88-
.map(JSONObject::toString)
89-
.orElse("");
90-
91-
if (error instanceof ResourceNotFoundException) {
92-
cfnException = new CfnNotFoundException(ResourceModel.TYPE_NAME, primaryIdentifier, error);
93-
} else if (error instanceof ValidationException || error instanceof CfnInvalidRequestException) {
94-
cfnException = new CfnInvalidRequestException(error);
95-
} else if (error instanceof ThrottlingException) {
96-
cfnException = new CfnThrottlingException(apiName, error);
97-
} else if (error instanceof ConflictException) {
98-
cfnException = new CfnResourceConflictException(error);
99-
} else if (error instanceof AccessDeniedException) {
100-
cfnException = new CfnAccessDeniedException(apiName, error);
101-
} else if (error instanceof ServiceQuotaExceededException) {
102-
cfnException = new CfnServiceLimitExceededException(error);
103-
} else {
104-
cfnException = new CfnGeneralServiceException(error);
105-
}
106-
107-
return ProgressEvent.failed(resourceModel, context, cfnException.getErrorCode(), cfnException.getMessage());
108-
}*/
10955
}

0 commit comments

Comments
 (0)