Repository navigation
Conversation
…nc document streams
…, JSON, PDF, and OCR loaders
…Failure for unreadable files
…ure in loaders and ingestion process
2 tasks
…lob, GCS, and S3 documentation
Pooria90
marked this pull request as ready for review
October 30, 2026 19:17
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1654.
One bad document no longer stops an ingest run. An undecodable file, a corrupt PDF, a failed download, or an error from the chunker or store is reported as a
DocumentFailedevent, and the rest of the corpus is still ingested.LoadFailure(source,error) for a source they can't read, then continue with the next one. Every file-based and cloud loader isolates each source through a shared_isolate_sourcehelper onBaseDocumentLoader.RetrievalRuntimeturns eachLoadFailureand each failing document into aDocumentFailedwith a newstagefield ("load","chunk","embed"or"store"). The newon_error="skip" | "raise"option defaults to"skip";"raise"keeps the old behaviour.EmbeddingModelMismatchError, errors raised out of a loader's own stream (it can't resume), and exceptions from theon_ingestcallback.Type of change
Checklist
ruff check . && ruff format .)pytest tests)Notes
Migration
BaseDocumentLoader.astream()now yieldsDocument | LoadFailure. Code that readsastream()directly should check forLoadFailure.load(),aload()andChunker.astream_documentsstill raise the error.DocumentFailedhas a new requiredstagefield, anddocument_idisNonewhenstage == "load".Left out