summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-08-06 13:08:35 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-08-06 13:08:35 +0100
commit9d567cc26c7a61956d45106d64d995091cfdf94a (patch)
tree02ea43e341954de758243ef731ddba5e4286a558
parentraise a SynapseError instead of tuple (diff)
downloadsynapse-anoa/fix_event_return_code.tar.xz
-rw-r--r--synapse/rest/client/v1/room.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 0418b69942..4b2344e696 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -582,8 +582,8 @@ class RoomEventServlet(RestServlet):
         if event:
             event = yield self._event_serializer.serialize_event(event, time_now)
             return (200, event)
-        else:
-            return (404, "Event not found.")
+
+        return SynapseError(404, "Event not found.", errcode=Codes.NOT_FOUND)
 
 
 class RoomEventContextServlet(RestServlet):