diff --git a/scenario/mocking.py b/scenario/mocking.py index e99006a0..38d95b28 100644 --- a/scenario/mocking.py +++ b/scenario/mocking.py @@ -632,6 +632,10 @@ def resource_get(self, resource_name: str) -> str: ) def credential_get(self) -> CloudSpec: + if not self._cloud_spec: + raise ModelError( + "ERROR cloud spec is empty, initialise it with `scenario.State(cloud_spec=...)`", + ) return self._state.cloud_spec