diff --git a/lib/Listener/ShareLinkAccessedListener.php b/lib/Listener/ShareLinkAccessedListener.php index 2f9f460..ce3e45d 100644 --- a/lib/Listener/ShareLinkAccessedListener.php +++ b/lib/Listener/ShareLinkAccessedListener.php @@ -54,8 +54,8 @@ public function handle(Event $event): void { } // Make sure we have a valid limit - $token = $event->getShare()->getToken(); try { + $token = $event->getShare()->getToken(); $shareLimit = $this->mapper->get($token); $limit = $shareLimit->getLimit(); @@ -76,6 +76,8 @@ public function handle(Event $event): void { $this->mapper->update($shareLimit); } catch (DoesNotExistException $e) { // No limit is set, ignore + } catch (\Exception $e) { + // Something went wrong, ignore } } }