Skip to content

Commit

Permalink
docs: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Devanshusisodiya committed Feb 25, 2025
1 parent bae6dc0 commit a0d6dce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/composio/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,13 @@ def initiate_connection(
timestamp = datetime.now().strftime("%Y%m%d%H%M%S")

if auth_mode is None:
raise ComposioClientError(
raise InvalidParams(
f"'auth_mode' should be one of {AUTH_SCHEME_WITH_INITIATE}"
)

# Casting here because mypy throws an error,
# here `auth_mode` can't be either None or
# outside AUTH_SCHEME_WITH_INITIATE
auth_mode = t.cast(AuthSchemeType, auth_mode)

return self.client.connected_accounts.initiate(
Expand Down

0 comments on commit a0d6dce

Please sign in to comment.