summaryrefslogtreecommitdiffstats
path: root/lib/Federation/CloudFederationProviderTalk.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-02-29 14:39:04 +0100
committerJoas Schilling <coding@schilljs.com>2024-02-29 14:39:04 +0100
commitc84be51f31f8eb6d8daa35dfdf77c89d61601f73 (patch)
tree3668a4861f900efc6c056d43985e313ea770fda9 /lib/Federation/CloudFederationProviderTalk.php
parent84f7ad35db0574448d1c269a1f6109c9aee68bf2 (diff)
fix(federation): Correctly handle database errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Federation/CloudFederationProviderTalk.php')
-rw-r--r--lib/Federation/CloudFederationProviderTalk.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Federation/CloudFederationProviderTalk.php b/lib/Federation/CloudFederationProviderTalk.php
index 9c5064102..5dd96ce58 100644
--- a/lib/Federation/CloudFederationProviderTalk.php
+++ b/lib/Federation/CloudFederationProviderTalk.php
@@ -364,7 +364,7 @@ class CloudFederationProviderTalk implements ICloudFederationProvider {
// 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;
}