From 92c6f4c38e9cad7c42b813d2a4c89e9cc4f88105 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 15 Aug 2019 18:10:38 +0100 Subject: [PATCH] Add M_USER_DEACTIVATED to list of error codes (#2234) Spec PR for [MSC 2181](https://github.com/matrix-org/matrix-doc/pull/2181). Adds the `M_USER_DEACTIVATED` error code and a short description to the client-server API. --- api/client-server/login.yaml | 7 +++++-- changelogs/client_server/newsfragments/2234.feature | 1 + specification/client_server_api.rst | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelogs/client_server/newsfragments/2234.feature diff --git a/api/client-server/login.yaml b/api/client-server/login.yaml index 98914a060c..f6c926389c 100644 --- a/api/client-server/login.yaml +++ b/api/client-server/login.yaml @@ -194,10 +194,13 @@ paths: "$ref": "definitions/errors/error.yaml" 403: description: |- - The login attempt failed. For example, the password may have been incorrect. + The login attempt failed. This can include one of the following error codes: + * ``M_FORBIDDEN``: The provided authentication data was incorrect. + * ``M_USER_DEACTIVATED``: The user has been deactivated. examples: application/json: { - "errcode": "M_FORBIDDEN"} + "errcode": "M_FORBIDDEN" + } schema: "$ref": "definitions/errors/error.yaml" 429: diff --git a/changelogs/client_server/newsfragments/2234.feature b/changelogs/client_server/newsfragments/2234.feature new file mode 100644 index 0000000000..bb1883b3a1 --- /dev/null +++ b/changelogs/client_server/newsfragments/2234.feature @@ -0,0 +1 @@ +Add ``M_USER_DEACTIVATED`` error code. diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 39a2fd3dc6..916604a37d 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -150,6 +150,10 @@ Other error codes the client might encounter are: :``M_UNAUTHORIZED``: The request was not correctly authorized. Usually due to login failures. +:``M_USER_DEACTIVATED``: + The user ID associated with the request has been deactivated. Typically for + endpoints that prove authentication, such as ``/login``. + :``M_USER_IN_USE``: Encountered when trying to register a user ID which has been taken.