From 205449a8e59c78f3b1032a3b996463d22588f05f Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Fri, 27 Feb 2026 02:35:47 -0500 Subject: tests.flow all pass. Now everything is GREEN ✅ --- jb/managers/thl.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jb/managers/thl.py') diff --git a/jb/managers/thl.py b/jb/managers/thl.py index 83f49f6..44b6496 100644 --- a/jb/managers/thl.py +++ b/jb/managers/thl.py @@ -23,6 +23,7 @@ import requests def get_user_profile(amt_worker_id: str) -> UserProfile: url = f"{settings.fsb_host}{settings.product_id}/user/{amt_worker_id}/profile/" res = requests.get(url).json() + if res.get("detail") == "user not found": raise ValueError("user not found") @@ -39,6 +40,7 @@ def get_user_blocked_or_not_exists(amt_worker_id: str) -> Optional[bool]: try: res = get_user_profile(amt_worker_id=amt_worker_id) return res.user.blocked if res.user.blocked is not None else False + except ValueError as e: if e.args[0] == "user not found": return True -- cgit v1.2.3