diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-07-15 13:25:52 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-07-15 13:25:52 +0100 |
commit | fff89c33d8e88397a135eefba90cb33188ace8a0 (patch) | |
tree | 8d934f9a6c3ec4f3ccef0421796ae925489e41c8 | |
parent | Return a different error from Invalid Password when a user is deactivated (#5... (diff) | |
download | synapse-fff89c33d8e88397a135eefba90cb33188ace8a0.tar.xz |
Add USER_DEACTIVATED error code and use it
-rw-r--r-- | synapse/api/errors.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index ad3e262041..cf1ebf1af2 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -61,6 +61,7 @@ class Codes(object): INCOMPATIBLE_ROOM_VERSION = "M_INCOMPATIBLE_ROOM_VERSION" WRONG_ROOM_KEYS_VERSION = "M_WRONG_ROOM_KEYS_VERSION" EXPIRED_ACCOUNT = "ORG_MATRIX_EXPIRED_ACCOUNT" + USER_DEACTIVATED = "M_USER_DEACTIVATED" class CodeMessageException(RuntimeError): @@ -151,7 +152,7 @@ class UserDeactivatedError(SynapseError): msg (str): The human-readable error message """ super(UserDeactivatedError, self).__init__( - code=http_client.FORBIDDEN, msg=msg, errcode=Codes.UNKNOWN + code=http_client.FORBIDDEN, msg=msg, errcode=Codes.USER_DEACTIVATED ) |