diff options
author | Amber H. Brown <hawkowl@atleastfornow.net> | 2019-07-01 23:13:21 +1000 |
---|---|---|
committer | Amber H. Brown <hawkowl@atleastfornow.net> | 2019-07-01 23:13:21 +1000 |
commit | 0993b05ca56198ac8ffe5ad6dea280b8fd99d0cf (patch) | |
tree | 393c9785588dd6612806f9d3ce391bbf741a4d0e | |
parent | fix (diff) | |
download | synapse-0993b05ca56198ac8ffe5ad6dea280b8fd99d0cf.tar.xz |
improve error text when room is too large
-rw-r--r-- | synapse/handlers/room_member.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index 08214692f5..a65832efed 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -38,6 +38,11 @@ from ._base import BaseHandler logger = logging.getLogger(__name__) id_server_scheme = "https://" +ROOM_COMPLEXITY_TOO_GREAT = ( + "Your homeserver is unable to join rooms this large or complex. " + "Please speak to your server administrator, or upgrade your instance " + "to join this room." +) class RoomMemberHandler(object): @@ -1087,9 +1092,8 @@ class RoomMemberMasterHandler(RoomMemberHandler): room_id, remote_room_hosts ) if too_complex is True: - msg = "Room too large (preflight)" raise SynapseError( - code=400, msg=msg, + code=400, msg=ROOM_COMPLEXITY_TOO_GREAT, errcode=Codes.RESOURCE_LIMIT_EXCEEDED ) @@ -1129,9 +1133,8 @@ class RoomMemberMasterHandler(RoomMemberHandler): room_id=room_id, action="leave" ) - msg = "Room too large (postflight)" raise SynapseError( - code=400, msg=msg, + code=400, msg=ROOM_COMPLEXITY_TOO_GREAT, errcode=Codes.RESOURCE_LIMIT_EXCEEDED ) |