diff options
| author | Max Nanis | 2026-02-27 02:35:47 -0500 |
|---|---|---|
| committer | Max Nanis | 2026-02-27 02:35:47 -0500 |
| commit | 205449a8e59c78f3b1032a3b996463d22588f05f (patch) | |
| tree | fdb706dc4ed6ab5e173d0ad4d39fcdd198a91ab8 /jb/managers/thl.py | |
| parent | dadd9643feceac94a2b84d9a3d3dda667f17583d (diff) | |
| download | amt-jb-205449a8e59c78f3b1032a3b996463d22588f05f.tar.gz amt-jb-205449a8e59c78f3b1032a3b996463d22588f05f.zip | |
tests.flow all pass. Now everything is GREEN ✅
Diffstat (limited to 'jb/managers/thl.py')
| -rw-r--r-- | jb/managers/thl.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
