Skip to content

Commit e00a08b

Browse files
committed
Added check for correct credentials
1 parent 9367190 commit e00a08b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/codeflare_sdk/cluster/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ def login(self) -> str:
106106
else:
107107
configuration.verify_ssl = False
108108
api_client = client.ApiClient(configuration)
109+
client.AuthenticationApi(api_client).get_api_group()
109110
config_path = None
110111
return "Logged into %s" % self.server
111-
except client.ApiException as exception:
112-
return exception
112+
except client.ApiException:
113+
api_client = None
114+
print("Authentication Error please provide the correct token + server")
113115

114116
def logout(self) -> str:
115117
"""

0 commit comments

Comments
 (0)