diff --git a/sceptre/diffing/stack_differ.py b/sceptre/diffing/stack_differ.py index a575c6afc..18577ef0b 100644 --- a/sceptre/diffing/stack_differ.py +++ b/sceptre/diffing/stack_differ.py @@ -201,6 +201,9 @@ def _create_deployed_stack_config( if err.response["Error"]["Message"].endswith("does not exist"): return None + # Unknown error, raise it as-is + raise err + stacks = description["Stacks"] for stack in stacks: if stack["StackStatus"] in self.STACK_STATUSES_INDICATING_NOT_DEPLOYED: diff --git a/tests/test_diffing/test_stack_differ.py b/tests/test_diffing/test_stack_differ.py index b05a2f045..234281cbe 100644 --- a/tests/test_diffing/test_stack_differ.py +++ b/tests/test_diffing/test_stack_differ.py @@ -234,6 +234,14 @@ def test_diff__deployed_stack_does_not_exist__returns_is_deployed_as_false(self) diff = self.differ.diff(self.actions) assert diff.is_deployed is False + def test_diff__raises_some_other_client_error(self): + self.actions.describe.side_effect = ClientError( + {"Error": {"Code": "ForbiddenException", "Message": "No access"}}, + "DescribeStacks", + ) + with pytest.raises(ClientError, match="No access"): + self.differ.diff(self.actions) + def test_diff__deployed_stack_does_not_exist__compares_none_to_generated_config( self, ):