Skip to content

Commit 45fc73b

Browse files
committed
Update
1 parent 09b24da commit 45fc73b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/fastapi_cloud_cli/commands/login.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,12 @@ def _fetch_access_token(client: httpx.Client, device_code: str, interval: int) -
7373

7474

7575
def _verify_token(client: httpx.Client) -> Tuple[bool, Union[str, None]]:
76-
try:
77-
response = client.get("/users/me")
78-
if response.status_code in {401, 403}:
79-
return False, None
80-
response.raise_for_status()
81-
data = response.json()
82-
return True, data.get("email")
83-
except Exception:
76+
response = client.get("/users/me")
77+
if response.status_code in {401, 403}:
8478
return False, None
79+
response.raise_for_status()
80+
data = response.json()
81+
return True, data.get("email")
8582

8683

8784
def login() -> Any:

0 commit comments

Comments
 (0)