mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Abri log_job raises a retriable transport error on an HTTP error status 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
9fefdf81aa
commit
d002a3defc
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue