From c84be51f31f8eb6d8daa35dfdf77c89d61601f73 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 29 Feb 2024 14:39:04 +0100 Subject: [PATCH] fix(federation): Correctly handle database errors Signed-off-by: Joas Schilling --- lib/Federation/CloudFederationProviderTalk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php index 9c506410278..5dd96ce58a0 100644 --- a/lib/Federation/CloudFederationProviderTalk.php +++ b/lib/Federation/CloudFederationProviderTalk.php @@ -364,7 +364,7 @@ private function messagePosted(int $remoteAttendeeId, array $notification): arra // DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION happens when // multiple users are in the same conversation. We are therefore // informed multiple times about the same remote message. - if ($e->getCode() !== DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION) { + if ($e->getReason() !== DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->logger->error('Error saving proxy cache message failed: ' . $e->getMessage(), ['exception' => $e]); throw $e; }