Skip to content
Snippets Groups Projects
Unverified Commit 1a03e2d0 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Also catch throwable's during account sync

parent 96b9ea31
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ use OCA\Mail\Service\Classification\ImportanceClassifier;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\ILogger;
use Throwable;
class NewMessageClassificationListener implements IEventListener {
private const EXEMPT_FROM_CLASSIFICATION = [
......@@ -78,7 +79,8 @@ class NewMessageClassificationListener implements IEventListener {
$message->setFlagImportant(true);
}
}
} catch (ServiceException $e) {
} catch (Throwable|ServiceException $e) {
// TODO: remove Throwable catch once https://github.com/RubixML/RubixML/pull/69 landed here
$this->logger->logException($e, [
'message' => 'Could not classify incoming message importance: ' . $e->getMessage(),
'level' => ILogger::ERROR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment