You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(parser): single corrupt page causes full document rejection with no per-page fallback or partial-result signal #275
parser.py builds all pages via tuple(generator) inside a single try block. If PyMuPDF raises an exception on page N (malformed xref, corrupted content stream), the exception propagates out of tuple() and the entire document is rejected — even if pages 0..N-1 were successfully parsed. There is no per-page exception handling, partial result, or indication of which page failed.
If _parse_pages raises on page 47 of a 200-page document, tuple() unwinds, the remaining pages are never parsed, and ParseError is raised — treating one bad page the same as a completely unparseable file.
Failure Scenario
Tenant uploads a 200-page PDF with one corrupt page (page 47 has a malformed image stream).
Activity
piyushmakhija28 commentedon Jun 21, 2026
Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)