RAG PDF Highlighter raises plain Python exceptions — all subclasses ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/MuhammadSalmanAhmad/rag-pdf-highlighter/llms.txt
Use this file to discover all available pages before exploring further.
HighlightError — so you can catch them without importing FastAPI. The exception hierarchy is defined in rag_pdf_highlighter.exceptions.
Exception reference
HighlightError
HighlightError
Base exception for all highlighting errors. Catch this to handle any error from the library.
PDFDownloadError
PDFDownloadError
Raised when
download_pdf() cannot fetch the PDF from the given URL. Causes include network errors, HTTP 4xx/5xx responses, and timeouts.PDFNotFoundError
PDFNotFoundError
Raised when
highlight_chunks_in_pdf() is called with a pdf_path that does not exist on disk.NoDocumentsError
NoDocumentsError
Raised when
highlight_chunks_in_pdf() receives an empty documents list.Catching exceptions
The example below shows how to handle each exception type in order of specificity, withHighlightError as the final catch-all for any other library error.
PDFDownloadError is only raised by download_pdf(), not by highlight_chunks_in_pdf() — you will see it when using the async download helper.