diff options
author | David Baker <dave@matrix.org> | 2018-07-17 15:43:33 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-07-17 15:43:33 +0100 |
commit | 1d11d9323d1d5eb419cbced9417f58d155c68255 (patch) | |
tree | 7b35de324a19d67f7fab5e6bc9c637c9c2253a71 /synapse/handlers/room.py | |
parent | Merge pull request #3502 from matrix-org/matthew/dinsic-tweak-display-names (diff) | |
parent | changelog (diff) | |
download | synapse-1d11d9323d1d5eb419cbced9417f58d155c68255.tar.xz |
Merge remote-tracking branch 'origin/master' into dinsic
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index f80311c11f..566a5d1ebf 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -23,7 +23,7 @@ from synapse.types import UserID, RoomAlias, RoomID, RoomStreamToken from synapse.api.constants import ( EventTypes, JoinRules, RoomCreationPreset ) -from synapse.api.errors import AuthError, StoreError, SynapseError +from synapse.api.errors import AuthError, Codes, StoreError, SynapseError from synapse.util import stringutils from synapse.visibility import filter_events_for_client @@ -117,7 +117,11 @@ class RoomCreationHandler(BaseHandler): ) if mapping: - raise SynapseError(400, "Room alias already taken") + raise SynapseError( + 400, + "Room alias already taken", + Codes.ROOM_IN_USE + ) else: room_alias = None |