Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 381cc8e

Browse files
committed
Update error codes.
1 parent a588b7b commit 381cc8e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

synapse/api/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Codes:
7777
BAD_ALIAS = "M_BAD_ALIAS"
7878
# For restricted join rules.
7979
UNABLE_AUTHORISE_JOIN = "M_UNABLE_TO_AUTHORISE_JOIN"
80-
CANNOT_ALLOW = "M_CANNOT_ALLOW"
80+
UNABLE_TO_GRANT_JOIN = "M_UNABLE_TO_GRANT_JOIN"
8181

8282

8383
class CodeMessageException(RuntimeError):

synapse/handlers/event_auth.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ async def get_user_which_could_invite(
135135

136136
# No user was found.
137137
raise SynapseError(
138-
400, "Unable to find a user which could issue an invite", Codes.CANNOT_ALLOW
138+
400,
139+
"Unable to find a user which could issue an invite",
140+
Codes.UNABLE_TO_GRANT_JOIN,
139141
)
140142

141143
async def check_host_in_room(self, room_id: str, host: str) -> bool:

0 commit comments

Comments
 (0)