File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
lib/crewai/src/crewai/cli/tools Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11import base64
2+ from json import JSONDecodeError
23import os
34from pathlib import Path
45import subprocess
@@ -162,9 +163,19 @@ def login(self) -> None:
162163
163164 if login_response .status_code != 200 :
164165 console .print (
165- "Authentication failed. Verify if the currently active organization access to the tool repository, and run 'crewai login' again. " ,
166+ "Authentication failed. Verify if the currently active organization can access the tool repository, and run 'crewai login' again." ,
166167 style = "bold red" ,
167168 )
169+ try :
170+ console .print (
171+ f"[{ login_response .status_code } error - { login_response .json ().get ('message' , 'Unknown error' )} ]" ,
172+ style = "bold red italic" ,
173+ )
174+ except JSONDecodeError :
175+ console .print (
176+ f"[{ login_response .status_code } error - Unknown error - Invalid JSON response]" ,
177+ style = "bold red italic" ,
178+ )
168179 raise SystemExit
169180
170181 login_response_json = login_response .json ()
You can’t perform that action at this time.
0 commit comments