Raise ParseError from gs rendering error

This commit is contained in:
shamoon 2023-08-31 00:36:05 -07:00
parent 407a119b9a
commit 762743ec9d

View File

@ -340,7 +340,10 @@ class RasterisedDocumentParser(DocumentParser):
"Ghostscript PDF/A rendering failed, consider setting " "Ghostscript PDF/A rendering failed, consider setting "
"PAPERLESS_OCR_USER_ARGS: '{\"continue_on_soft_render_error\": true}'", # noqa: E501 "PAPERLESS_OCR_USER_ARGS: '{\"continue_on_soft_render_error\": true}'", # noqa: E501
) )
raise e
raise ParseError(
f"SubprocessOutputError: {e!s}. See logs for more information.",
) from e
except (NoTextFoundException, InputFileError) as e: except (NoTextFoundException, InputFileError) as e:
self.log.warning( self.log.warning(
f"Encountered an error while running OCR: {e!s}. " f"Encountered an error while running OCR: {e!s}. "