summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2023-02-15 11:47:57 +0000
committerGitHub <noreply@github.com>2023-02-15 11:47:57 +0000
commit5febf88b6c5194582f427142dc0850625547c0d9 (patch)
treee3a8c69949667254091f44dd50a2d104f264c933 /synapse/handlers/message.py
parentFix order of partial state tables when purging (#15068) (diff)
downloadsynapse-5febf88b6c5194582f427142dc0850625547c0d9.tar.xz
Update the error code for duplicate annotation (#15075)
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 8f5b658d9d..aa90d0000d 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -1337,7 +1337,11 @@ class EventCreationHandler:
                 relation.parent_id, event.type, aggregation_key, event.sender
             )
             if already_exists:
-                raise SynapseError(400, "Can't send same reaction twice")
+                raise SynapseError(
+                    400,
+                    "Can't send same reaction twice",
+                    errcode=Codes.DUPLICATE_ANNOTATION,
+                )
 
         # Don't attempt to start a thread if the parent event is a relation.
         elif relation.rel_type == RelationTypes.THREAD: