diff --git a/src/phase/utils/phase_io.py b/src/phase/utils/phase_io.py index 5e71ca0..12e11ed 100644 --- a/src/phase/utils/phase_io.py +++ b/src/phase/utils/phase_io.py @@ -49,6 +49,10 @@ def __init__(self, init=True, pss=None, host=None): app_secret = pss self._api_host = host + # Check if app_secret is None + if app_secret is None: + raise ValueError("Phase token (pss) is missing") + # Determine the type of the token (service token or user token) self.is_service_token = pss_service_pattern.match(app_secret) is not None self.is_user_token = pss_user_pattern.match(app_secret) is not None