aws-cloudformation / aws-cloudformation/cloudformation-cli-java-plugin

Auto map Amazon exception into CFN exception to reduce handler exception mapping

Open
#353 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
30
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Cloudformation will do retry for retriable exception, such as throttling exception. However, it requires each handler to map the exception into CFN throttling error.

We should be able to auto map the exception to reduce the effort for all resource to map it. For example:

```java
...................
} catch (AmazonServiceException ex) {
if (RetryUtils.isThrottlingException(ex)) {
logger.log(String.format("%s [%s] Create call throttled by downstream service", ResourceModel.TYPE_NAME, model.getAlarmName()));
return ProgressEvent.defaultFailureHandler(ex, HandlerErrorCode.Throttling);
}
..................
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.