mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 01:21:09 +03:00
Actually fix exceptions
This commit is contained in:
parent
1d7420ed2f
commit
5e6b5ccd26
1 changed files with 2 additions and 6 deletions
|
@ -259,10 +259,8 @@ class DirectoryHandler(BaseHandler):
|
||||||
servers = result["servers"]
|
servers = result["servers"]
|
||||||
|
|
||||||
if not room_id:
|
if not room_id:
|
||||||
raise SynapseError(
|
raise NotFoundError(
|
||||||
404,
|
|
||||||
"Room alias %s not found" % (room_alias.to_string(),),
|
"Room alias %s not found" % (room_alias.to_string(),),
|
||||||
Codes.NOT_FOUND
|
|
||||||
)
|
)
|
||||||
|
|
||||||
hosts = yield self.state.get_current_hosts_in_room(room_id)
|
hosts = yield self.state.get_current_hosts_in_room(room_id)
|
||||||
|
@ -303,10 +301,8 @@ class DirectoryHandler(BaseHandler):
|
||||||
"servers": result["servers"],
|
"servers": result["servers"],
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
raise SynapseError(
|
raise NotFoundError(
|
||||||
404,
|
|
||||||
"Room alias %r not found" % (room_alias.to_string(),),
|
"Room alias %r not found" % (room_alias.to_string(),),
|
||||||
Codes.NOT_FOUND
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Reference in a new issue