Skip to content

Commit

Permalink
Force certain names in exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Oct 7, 2023
1 parent 0dc86a4 commit 5f1d8be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cloudformation_cli_python_lib/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def _invoke_handler( # pylint: disable=too-many-arguments
handler = self._handlers[invocation_point]
except KeyError:
return ProgressEvent.failed(
HandlerErrorCode.InternalFailure, f"No handler for {invocation_point}"
HandlerErrorCode.InternalFailure,
f"No handler for {invocation_point._name_}",
)

return handler(session, request, callback_context, type_configuration)
Expand Down
2 changes: 1 addition & 1 deletion src/cloudformation_cli_python_lib/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _invoke_handler(
handler = self._handlers[action]
except KeyError:
return ProgressEvent.failed(
HandlerErrorCode.InternalFailure, f"No handler for {action}"
HandlerErrorCode.InternalFailure, f"No handler for {action._name_}"
)
progress = handler(session, request, callback_context)
is_in_progress = progress.status == OperationStatus.IN_PROGRESS
Expand Down

0 comments on commit 5f1d8be

Please sign in to comment.