mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Erik Arvstedt
					Erik Arvstedt