diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-08-06 13:08:35 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-08-06 13:08:35 +0100 |
commit | 9d567cc26c7a61956d45106d64d995091cfdf94a (patch) | |
tree | 02ea43e341954de758243ef731ddba5e4286a558 | |
parent | raise a SynapseError instead of tuple (diff) | |
download | synapse-github/anoa/fix_event_return_code.tar.xz |
change other 404 to a SynapseError github/anoa/fix_event_return_code anoa/fix_event_return_code
-rw-r--r-- | synapse/rest/client/v1/room.py | 4 |
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): |