fix(rag): handle malformed PDF parser failures#976
Open
eshaanag wants to merge 2 commits into
Open
Conversation
Signed-off-by: Eshaan Agrawal <agrawaleshaan12@gmail.com>
Signed-off-by: Eshaan Agrawal <agrawaleshaan12@gmail.com>
Contributor
Author
|
CI baseline note after the latest push:
|
Contributor
Author
|
This PR is tied to #975, which I raised for GSSoC 2026 around the RAG PDF parser failure path. Could you please add the relevant GSSoC label if it fits the program rules? |
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 #975
Handles malformed or encrypted PDF parser failures as sanitized client errors, and maps unexpected document-loader failures to logged, generic service-unavailable responses. Adds focused regression coverage for both failure paths so parser and infrastructure details are not exposed to API clients.
Type of Change
Checklist
pytest backend/tests/passes locally (local checkout does not have pytest installed).envor any secretsTesting
git diff --checkpython3 -m compileall backend/app/api/v1/rag.py backend/tests/test_rag_ingest.pypython3 -m pytest backend/tests/test_rag_ingest.py -q(not run: local Python environment has no pytest module)Screenshots (if UI change)
Not applicable.