From 83d92010de06bef235393788c8be003b40261882 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 14 Jul 2026 13:41:43 +0000 Subject: [PATCH] =?UTF-8?q?Raise=20UnauthorizedError=20when=20RdSAP=20Summ?= =?UTF-8?q?ary=20fetch=20returns=20401=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- backend/pashub_fetcher/pashub_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/pashub_fetcher/pashub_client.py b/backend/pashub_fetcher/pashub_client.py index 2ca34367d..8ae84e617 100644 --- a/backend/pashub_fetcher/pashub_client.py +++ b/backend/pashub_fetcher/pashub_client.py @@ -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(