Delete file from document and indexed files when exception occur.
Scenario: When we upload a corrupted file (renaming a file from .docx to .pptx) and upload to vector db, then it does throw error but also doesn't remove file from document folder. This change removes that file from document folder whenever there is a error thrown while reading a corrupted file.
That's why kept inside try-catch block to handle.
Delete file from document and indexed files when exception occur.
Scenario: When we upload a corrupted file (renaming a file from .docx to .pptx) and upload to vector db, then it does throw error but also doesn't remove file from document folder. This change removes that file from document folder whenever there is a error thrown while reading a corrupted file. That's why kept inside try-catch block to handle.