From d002a3defc5c8bfc385296395a6682960ecf4963 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 14:27:43 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20log=5Fjob=20raises=20a=20retriable=20tra?= =?UTF-8?q?nsport=20error=20on=20an=20HTTP=20error=20status=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- infrastructure/abri/abri_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infrastructure/abri/abri_client.py b/infrastructure/abri/abri_client.py index bd63f056a..9731431e2 100644 --- a/infrastructure/abri/abri_client.py +++ b/infrastructure/abri/abri_client.py @@ -10,6 +10,7 @@ from domain.abri.models import ( ) from infrastructure.abri.config import AbriConfig from infrastructure.abri.envelope import serialise_relay_request +from infrastructure.abri.errors import AbriTransportError STD_JOB_CODE = "SCSEXT" CLIENT_CODE = "HSG" @@ -39,7 +40,11 @@ class AbriClient: username=self._config.username, password=self._config.password, ) - response = self._session.post(self._config.endpoint_url, data=body) + try: + response = self._session.post(self._config.endpoint_url, data=body) + response.raise_for_status() + except requests.HTTPError as error: + raise AbriTransportError(str(error)) from error root = ET.fromstring(response.content) if root.tag == "response": return self._parse_rejection(root)