From dc361798e51ee43f3f7fe4c11dd37251a7d2ffd9 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 5 Aug 2019 12:39:36 +0100 Subject: [PATCH] raise a SynapseError instead of tuple --- synapse/rest/client/v1/room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index aaeb034ee3..0418b69942 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -576,7 +576,7 @@ class RoomEventServlet(RestServlet): # This endpoint is supposed to return a 404 when the requester does # not have permission to access the event # https://matrix.org/docs/spec/client_server/r0.5.0#get-matrix-client-r0-rooms-roomid-event-eventid - return (404, "Event not found.", errcode=Codes.NOT_FOUND) + raise SynapseError(404, "Event not found.", errcode=Codes.NOT_FOUND) time_now = self.clock.time_msec() if event: