narrow catch to nextcloud dbal exceptions

This commit is contained in:
thrillfall 2021-08-22 23:23:02 +02:00
parent 029c010e2f
commit 0f6ab73cf2
1 changed files with 1 additions and 1 deletions

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