mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Fail loudly when PasHub truncates the evidence list 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d8f673a31f
commit
c95d3b20dc
1 changed files with 11 additions and 1 deletions
|
|
@ -192,7 +192,17 @@ class PashubClient:
|
|||
|
||||
r.raise_for_status()
|
||||
|
||||
results = r.json().get("results", [])
|
||||
payload: Dict[str, Any] = r.json()
|
||||
results: List[Dict[str, Any]] = payload.get("results", [])
|
||||
total: int = payload.get("totalItemCount", len(results))
|
||||
|
||||
if len(results) < total:
|
||||
raise TruncatedEvidenceListError(
|
||||
f"PasHub returned {len(results)} of {total} evidence files for job "
|
||||
f"{job_id} - the response was truncated and the evidence set is "
|
||||
f"incomplete. Increase _EVIDENCE_PAGE_SIZE in pashub_client.py "
|
||||
f"above {total} and re-run."
|
||||
)
|
||||
|
||||
return [EvidenceFileData.from_api(item) for item in results]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue