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

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

Ouverte
#353 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Java
Étoiles
30
Forks
48
Métriques de merge des PR
Aucune PR mergée en 30 j

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);
}
..................
}

```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.