Raise truncation error when PasHub stops serving pages before the full evidence set arrives 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-28 10:12:03 +00:00
parent f02441b6c4
commit 3c52a0aad6

View file

@ -203,6 +203,12 @@ class PashubClient:
if len(results) >= total:
break
if not batch:
raise TruncatedEvidenceListError(
f"PasHub returned {len(results)} of {total} evidence files for "
f"job {job_id} - it stopped serving pages before the full "
f"evidence set arrived, so the evidence set is incomplete."
)
page_index += 1
return [EvidenceFileData.from_api(item) for item in results]