diff --git a/app/main.py b/app/main.py index 6ef1d68..f3932e7 100644 --- a/app/main.py +++ b/app/main.py @@ -15,7 +15,7 @@ SUBPROCESS_TIMEOUT = 60 # seconds MAX_QUEUE_WAIT_TIME = 30 # max time to wait in queue before bailing, prevents case where queue gets so long that no requests finish before browser timeout -MAX_INPUT_SIZE = 5000000 # bytes +MAX_INPUT_SIZE = 10000000 # bytes MAX_CONCURRENT_PANDOC_RUNS = 2 MD_FILE_NAME = "input.md" OUTPUT_FILE_NAME_BASE = "output" @@ -86,7 +86,7 @@ async def convert(self): if proc.returncode != 0: if self.doc_type == "pdf": - raise HTTPException(status_code=500, detail="Error generating a PDF, consider generating a .docx file instead since the .pdf generation process can have errors with certain image types or certain fonts.

" + raise HTTPException(status_code=500, detail="Error generating PDF file. Image links are known to cause errors when generating .pdf documents. Replace image links with images inserted as files. If errors persist, consider exporting as a .docx file instead.

" + "Pandoc process error: " + stderr.decode()) else: raise HTTPException(status_code=500, detail=stderr.decode()) @@ -196,4 +196,4 @@ async def health_check(): if all([not task.done() for task in tasks]): return Response(status_code=200, content="All tasks are currently running") else: - return Response(status_code=503, content="Some tasks are no longer active") \ No newline at end of file + return Response(status_code=503, content="Some tasks are no longer active")