Skip to content
Snippets Groups Projects
Commit 8993affd authored by Mark Haines's avatar Mark Haines
Browse files

SYN-153: Raise 404 if room alias is not found

parent ff23e5ba
Branches
Tags
No related merge requests found
...@@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler): ...@@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler):
room_alias room_alias
) )
defer.returnValue({ if result is not None:
"room_id": result.room_id, defer.returnValue({
"servers": result.servers, "room_id": result.room_id,
}) "servers": result.servers,
})
else:
raise SynapseError(404, "Room alias \"%s\" not found", room_alias)
@defer.inlineCallbacks @defer.inlineCallbacks
def send_room_alias_update_event(self, user_id, room_id): def send_room_alias_update_event(self, user_id, room_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment