fix 500 error on non-existing stack name
This commit is contained in:
parent
da40c7125a
commit
c877266f86
2 changed files with 5 additions and 0 deletions
|
|
@ -229,6 +229,9 @@ class CloudFormationResponse(BaseResponse):
|
|||
stack_name_or_id = self._get_param("StackName")
|
||||
resources = self.cloudformation_backend.list_stack_resources(stack_name_or_id)
|
||||
|
||||
if not resources:
|
||||
raise ValidationError(stack_name_or_id)
|
||||
|
||||
template = self.response_template(LIST_STACKS_RESOURCES_RESPONSE)
|
||||
return template.render(resources=resources)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue