aws-cloudformation / aws-cloudformation/cloudformation-cli-python-plugin

Matching service errors to CloudFormation error types?

オープン
#74 コメント 0 件 リアクション 2 件 担当者 1 名 @ericzbeard が担当を希望しています GitHub で見る
investigating
主要言語
Python
スター
107
フォーク
46
PR マージ指標
30日以内にマージされた PR はありません

説明

There exists a complete mapping from all errors generated by AWS services to the types of errors that can be raised by a resource handler ([defined here](https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/blob/master/src/cloudformation_cli_python_lib/exceptions.py)), though this mapping is currently implicit. There will always be users who want to create their own resources around AWS services, either because of incomplete coverage or for custom behavior. These users need to deduce the elements of this mapping themselves and then implement a matching algorithm in code, as shown in [this example](https://github.com/WeAreCloudar/cloudformation-samples/blob/f59da08d3c3b8b396a00afc97a07f8b92c327c8a/resource_providers/cloudar_ec2_keypair/src/cloudar_ec2_keypair/handlers.py#L44).

Two questions:
1. Could the library make this easier, by providing a way for users to declaratively define the mapping and a convenience method to filter boto exceptions and raise matched CloudFormation exceptions?
2. I _think_ the mapping doesn't depend really ever depend on the user (not totally sure on this part), so once someone has figured it out for one service, that would be useful to all users. Could this mapping therefore be part of the library itself, and contributed to by users over time?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。