diff options
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/directory.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index 98ac0684fc..ed9b0f8551 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler): room_alias ) - defer.returnValue({ - "room_id": result.room_id, - "servers": result.servers, - }) + if result is not None: + defer.returnValue({ + "room_id": result.room_id, + "servers": result.servers, + }) + else: + raise SynapseError(404, "Room alias \"%s\" not found", room_alias) + @defer.inlineCallbacks def send_room_alias_update_event(self, user_id, room_id): |