Skip to content

Commit 92b557d

Browse files
authored
Merge pull request #15 from phasehq/fix--handle-missing-token
feat: add validation for app_secret
2 parents 493fba1 + fea4886 commit 92b557d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/phase/utils/phase_io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ def __init__(self, init=True, pss=None, host=None):
4949
app_secret = pss
5050
self._api_host = host
5151

52+
# Check if app_secret is None
53+
if app_secret is None:
54+
raise ValueError("Phase token (pss) is missing")
55+
5256
# Determine the type of the token (service token or user token)
5357
self.is_service_token = pss_service_pattern.match(app_secret) is not None
5458
self.is_user_token = pss_user_pattern.match(app_secret) is not None

0 commit comments

Comments
 (0)