narrow catch to nextcloud dbal exceptions

This commit is contained in:
thrillfall 2021-08-22 23:23:02 +02:00
parent 029c010e2f
commit 0f6ab73cf2

View File

@ -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);
}