mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Fix: ghostscript rendering error doesnt trigger frontend failure message (#4092)
* Raise ParseError from gs rendering error * catch all parser errors as generic exception * Differentiate generic vs parse errors during consumption
This commit is contained in:
parent
407a119b9a
commit
e14f4c94c2
4 changed files with 70 additions and 6 deletions
|
|
@ -450,11 +450,18 @@ class Consumer(LoggingMixin):
|
|||
archive_path = document_parser.get_archive_path()
|
||||
|
||||
except ParseError as e:
|
||||
self._fail(
|
||||
str(e),
|
||||
f"Error occurred while consuming document {self.filename}: {e}",
|
||||
exc_info=True,
|
||||
exception=e,
|
||||
)
|
||||
except Exception as e:
|
||||
document_parser.cleanup()
|
||||
tempdir.cleanup()
|
||||
self._fail(
|
||||
str(e),
|
||||
f"Error while consuming document {self.filename}: {e}",
|
||||
f"Unexpected error while consuming document {self.filename}: {e}",
|
||||
exc_info=True,
|
||||
exception=e,
|
||||
)
|
||||
|
|
@ -544,8 +551,8 @@ class Consumer(LoggingMixin):
|
|||
except Exception as e:
|
||||
self._fail(
|
||||
str(e),
|
||||
f"The following error occurred while consuming "
|
||||
f"{self.filename}: {e}",
|
||||
f"The following error occurred while storing document "
|
||||
f"{self.filename} after consuming: {e}",
|
||||
exc_info=True,
|
||||
exception=e,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue