Raise UnauthorizedError when RdSAP Summary fetch returns 401 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-14 13:41:43 +00:00
parent b596f32af1
commit 83d92010de

View file

@ -137,6 +137,8 @@ class PashubClient:
url = f"{self.base}/jobs/{job_id}/rdSapSummary"
r = self.session.get(url)
if r.status_code == 401:
raise UnauthorizedError("Token expired or invalid")
data: Dict[str, Any] = r.json()
return RdSapSummary(