diff options
author | Erik Johnston <erik@matrix.org> | 2018-11-29 11:46:28 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-11-29 11:46:28 +0000 |
commit | 230474b6206b51f5ee11763dfc70e331c8993964 (patch) | |
tree | a5e0f955751155bcf2caeeb840385033a3a8b9f7 | |
parent | Don't log ERROR when no profile exists (diff) | |
download | synapse-experimental2.tar.xz |
Actually fix exceptions github/experimental2 experimental2
-rw-r--r-- | synapse/handlers/directory.py | 8 |
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 |