Skip to content

Commit 0e66823

Browse files
Added UnsupportedTarget error code (#224)
1 parent 05e496c commit 0e66823

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/cloudformation_cli_python_lib/exceptions.py

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ def __init__(self, type_name: str, message: str):
9696
)
9797

9898

99+
class UnsupportedTarget(_HandlerError):
100+
def __init__(self, hook_type_name: str, target_type_name: str):
101+
super().__init__(
102+
f"Hook of type '{hook_type_name}' received request"
103+
f" for unsupported target '{target_type_name}'"
104+
)
105+
106+
99107
class Unknown(_HandlerError):
100108
pass
101109

src/cloudformation_cli_python_lib/interface.py

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class HandlerErrorCode(str, _AutoName):
7373
InvalidTypeConfiguration = auto()
7474
HandlerInternalFailure = auto()
7575
NonCompliant = auto()
76+
UnsupportedTarget = auto()
7677
Unknown = auto()
7778

7879

0 commit comments

Comments
 (0)