fix(sam21): broader httpx catch + tighter test assertions
Catch httpx.RequestError so DecodingError etc. trigger the bbox fallback instead of propagating raw. Lock the intrinsics dict shape in the happy-path test, drop unused imports. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
75da9add84
commit
0bc1e02f11
2 files changed
+6
-3
No files matched your search
@@ -63,7 +63,7 @@ class Sam21Client:
|
||||
try:
|
||||
with httpx.Client(timeout=self.timeout_s) as c:
|
||||
r = c.post(url, json=body)
|
||||
except (httpx.ConnectError, httpx.TimeoutException, httpx.NetworkError) as e:
|
||||
except httpx.RequestError as e:
|
||||
raise Sam21Unavailable(f"sam21 unreachable: {e}") from e
|
||||
|
||||
# Try to parse the envelope even on non-2xx, because SAM21 always
|
||||
|
||||
Reference in new issue
Block a user