raise a SynapseError instead of tuple

This commit is contained in:
Andrew Morgan 2019-08-05 12:39:36 +01:00
parent f536e7c6a7
commit dc361798e5

View file

@ -576,7 +576,7 @@ class RoomEventServlet(RestServlet):
# This endpoint is supposed to return a 404 when the requester does # This endpoint is supposed to return a 404 when the requester does
# not have permission to access the event # 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 # 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() time_now = self.clock.time_msec()
if event: if event: