Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wbingli opened this issue Feb 14, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@wbingli
Copy link
Contributor

wbingli commented Feb 14, 2021

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:

...................
         } 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);
             }
..................
}
@wbingli wbingli added the enhancement New feature or request label Feb 14, 2021
@PatMyron
Copy link
Contributor

Exception mapping should be language-agnostic in my opinion:
aws-cloudformation/cloudformation-cli-python-plugin#74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants