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
Commit 996e1e8
Browse filesBrowse the repository at this point in the historyBrowse files
fix: raise on an empty HTTP-200 split chunk in NDJSON mode (0.46.1)
In NDJSON elements-file mode a split-PDF chunk that returned 200 with an
empty body was logged and skipped, so the combined elements_file was short
by those pages while the call still succeeded. `split_pdf_allow_failed`
does not cover it -- an empty 200 counts as a successful chunk -- and
`combine_chunk_files_to_ndjson` returns only a path, so nothing downstream
could detect the truncation.
Recombination now raises `EmptyChunkResponseError` (a `ValueError`) instead,
matching the buffered path, which raises `JSONDecodeError` on the same
response. An empty JSON array is still accepted: `[]` and an empty body are
different responses on the wire and only the latter is a defect.
Refs ML-1672.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## 0.46.1
2
+
3
+
### Fixes
4
+
* Fail loudly when a split-PDF chunk returns HTTP 200 with an empty body in NDJSON elements-file mode. The chunk used to be logged and skipped, so the combined `elements_file` was silently short by those pages while the call still returned 200 — and `split_pdf_allow_failed=False` did not catch it, because an empty 200 counts as a successful chunk. Recombination now raises `EmptyChunkResponseError` (a `ValueError`), matching the buffered path, which raises `JSONDecodeError` on the same response. A chunk that legitimately produced no elements returns an empty JSON array and is still accepted.
0 commit comments