Skip to content

Commit

Permalink
Session key expired should be checked after active_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jahwag committed Aug 21, 2024
1 parent 0836b10 commit 9c69c6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/claudesync/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,14 @@ def validate_and_get_provider(config, require_org=True, require_project=False):
"""
active_provider = config.get("active_provider")
session_key = config.get_session_key()
if not session_key:
raise ProviderError(
f"Session key has expired. Please run `claudesync api login {active_provider}` again."
)
if not active_provider or not session_key:
raise ConfigurationError(
"No active provider or session key. Please login first."
)
if not session_key:
raise ProviderError(
f"Session key has expired. Please run `claudesync api login {active_provider}` again."
)
if require_org and not config.get("active_organization_id"):
raise ConfigurationError(
"No active organization set. Please select an organization."
Expand Down

0 comments on commit 9c69c6a

Please sign in to comment.