Skip to content

Commit 5f1d8be

Browse files
committed
Force certain names in exceptions
1 parent 0dc86a4 commit 5f1d8be

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/cloudformation_cli_python_lib/hook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def _invoke_handler( # pylint: disable=too-many-arguments
9191
handler = self._handlers[invocation_point]
9292
except KeyError:
9393
return ProgressEvent.failed(
94-
HandlerErrorCode.InternalFailure, f"No handler for {invocation_point}"
94+
HandlerErrorCode.InternalFailure,
95+
f"No handler for {invocation_point._name_}",
9596
)
9697

9798
return handler(session, request, callback_context, type_configuration)

src/cloudformation_cli_python_lib/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _invoke_handler(
8989
handler = self._handlers[action]
9090
except KeyError:
9191
return ProgressEvent.failed(
92-
HandlerErrorCode.InternalFailure, f"No handler for {action}"
92+
HandlerErrorCode.InternalFailure, f"No handler for {action._name_}"
9393
)
9494
progress = handler(session, request, callback_context)
9595
is_in_progress = progress.status == OperationStatus.IN_PROGRESS

0 commit comments

Comments
 (0)