From 9d567cc26c7a61956d45106d64d995091cfdf94a Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 6 Aug 2019 13:08:35 +0100 Subject: [PATCH] change other 404 to a SynapseError --- synapse/rest/client/v1/room.py | 4 ++-- 1 file 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):