change other 404 to a SynapseError

This commit is contained in:
Andrew Morgan 2019-08-06 13:08:35 +01:00
parent dc361798e5
commit 9d567cc26c

View file

@ -582,8 +582,8 @@ class RoomEventServlet(RestServlet):
if event: if event:
event = yield self._event_serializer.serialize_event(event, time_now) event = yield self._event_serializer.serialize_event(event, time_now)
return (200, event) return (200, event)
else:
return (404, "Event not found.") return SynapseError(404, "Event not found.", errcode=Codes.NOT_FOUND)
class RoomEventContextServlet(RestServlet): class RoomEventContextServlet(RestServlet):