summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-11-29 11:46:28 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-02-13 20:54:34 +0000
commit8a090731c9f9db5fcdf5f71d5e75939a712dcdba (patch)
tree658d4a16f05c5d918307c53595fbb3950efc03cc
parentReduce size of fed transaction IDs (diff)
downloadsynapse-8a090731c9f9db5fcdf5f71d5e75939a712dcdba.tar.xz
Actually fix exceptions
-rw-r--r--synapse/handlers/directory.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index 0699731c13..8a96489a32 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -259,10 +259,8 @@ class DirectoryHandler(BaseHandler):
                 servers = result["servers"]
 
         if not room_id:
-            raise SynapseError(
-                404,
+            raise NotFoundError(
                 "Room alias %s not found" % (room_alias.to_string(),),
-                Codes.NOT_FOUND
             )
 
         users = yield self.state.get_current_user_in_room(room_id)
@@ -302,10 +300,8 @@ class DirectoryHandler(BaseHandler):
                 "servers": result.servers,
             })
         else:
-            raise SynapseError(
-                404,
+            raise NotFoundError(
                 "Room alias %r not found" % (room_alias.to_string(),),
-                Codes.NOT_FOUND
             )
 
     @defer.inlineCallbacks