Skip to content

Commit fabe74d

Browse files
authored
Fix fake 404 (#367)
* Fix incorrect 404 errors when searchinf by filename * Increase office timeout to 300
1 parent afa8427 commit fabe74d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

core/routes/documents.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ async def get_document_by_filename(
288288
raise HTTPException(status_code=404, detail=f"Document with filename '{filename}' not found")
289289
return doc
290290
except HTTPException as e:
291-
logger.error(f"Error getting document by filename: {e}")
291+
if e.status_code >= 500:
292+
logger.error(f"Error getting document by filename: {e}")
292293
raise e
293294

294295

core/services/ingestion_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ def _convert_office_to_images(
16231623
],
16241624
capture_output=True,
16251625
text=True,
1626-
timeout=90,
1626+
timeout=300,
16271627
)
16281628

16291629
if result.returncode != 0:

0 commit comments

Comments
 (0)