mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
Mail fetching: Only catch internal errors
Previously, all errors raised during mail fetching were silently caught and printed without backtrace. To increase robustness and ease debugging, we now fail with a backtrace on unexpected errors.
This commit is contained in:
parent
bce2d3dd22
commit
d5e56095ac
@ -20,7 +20,7 @@ class MailFetcherError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidMessageError(Exception):
|
||||
class InvalidMessageError(MailFetcherError):
|
||||
pass
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ class MailFetcher(Loggable):
|
||||
self._connection.close()
|
||||
self._connection.logout()
|
||||
|
||||
except Exception as e:
|
||||
except MailFetcherError as e:
|
||||
self.log("error", str(e))
|
||||
|
||||
return r
|
||||
|
Loading…
x
Reference in New Issue
Block a user