mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-12 09:37:04 +01: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
82f9dde055
commit
aa2fc84d7f
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ class MailFetcherError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class InvalidMessageError(Exception):
|
class InvalidMessageError(MailFetcherError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -205,7 +205,7 @@ class MailFetcher(Loggable):
|
||||||
self._connection.close()
|
self._connection.close()
|
||||||
self._connection.logout()
|
self._connection.logout()
|
||||||
|
|
||||||
except Exception as e:
|
except MailFetcherError as e:
|
||||||
self.log("error", str(e))
|
self.log("error", str(e))
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue