mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Add AWS boto3 error code exception function is_boto3_error_code (#41202)
* Add aws/core.py function to check for specific AWS error codes * Use sys.exc_info to get exception object if it isn't passed in * Allow catching exceptions with is_boto3_error_code * Replace from_code with is_boto3_error_code * Return a type that will never be raised to support stricter type comparisons in Python 3+ * Use is_boto3_error_code in aws_eks_cluster * Add duplicate-except to ignores when using is_boto3_error_code * Add is_boto3_error_code to module development guideline docs
This commit is contained in:
committed by
Ryan Brown
parent
269f404121
commit
40d2df0ef3
4
changelogs/fragments/aws_core_is_boto3_error_code.yml
Normal file
4
changelogs/fragments/aws_core_is_boto3_error_code.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
minor_changes:
|
||||
- Add `is_boto3_error_code` function to `module_utils/aws/core.py` to make it
|
||||
easier for modules to handle special AWS error codes.
|
||||
Reference in New Issue
Block a user