summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-07-17 15:43:33 +0100
committerDavid Baker <dave@matrix.org>2018-07-17 15:43:33 +0100
commit1d11d9323d1d5eb419cbced9417f58d155c68255 (patch)
tree7b35de324a19d67f7fab5e6bc9c637c9c2253a71 /synapse/handlers/room.py
parentMerge pull request #3502 from matrix-org/matthew/dinsic-tweak-display-names (diff)
parentchangelog (diff)
downloadsynapse-1d11d9323d1d5eb419cbced9417f58d155c68255.tar.xz
Merge remote-tracking branch 'origin/master' into dinsic
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py8
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