From 0f6ab73cf2426da7cb1778c8df11668efe2c54c5 Mon Sep 17 00:00:00 2001 From: thrillfall Date: Sun, 22 Aug 2021 23:23:02 +0200 Subject: [PATCH] narrow catch to nextcloud dbal exceptions --- lib/Core/SubscriptionChange/SubscriptionChangeSaver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Core/SubscriptionChange/SubscriptionChangeSaver.php b/lib/Core/SubscriptionChange/SubscriptionChangeSaver.php index 21b5fb4..827b25e 100644 --- a/lib/Core/SubscriptionChange/SubscriptionChangeSaver.php +++ b/lib/Core/SubscriptionChange/SubscriptionChangeSaver.php @@ -40,7 +40,7 @@ class SubscriptionChangeSaver $this->subscriptionChangeWriter->create($subscriptionChangeEntity); } catch (UniqueConstraintViolationException $uniqueConstraintViolationException) { $this->updateSubscription($subscriptionChangeEntity, $userId); - } catch (\Exception $exception) { + } catch (Exception $exception) { if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->updateSubscription($subscriptionChangeEntity, $userId); }