From c9523087b8992726f7e1bb685a352904685d02cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 17 Dec 2025 10:33:41 +0100 Subject: [PATCH] Add error code to error response definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- data/api/client-server/login.yaml | 9 +++++++-- data/api/client-server/registration.yaml | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/data/api/client-server/login.yaml b/data/api/client-server/login.yaml index 4eba954e..7251d4ff 100644 --- a/data/api/client-server/login.yaml +++ b/data/api/client-server/login.yaml @@ -243,8 +243,13 @@ paths: } } "400": - description: Part of the request was invalid. For example, the login type may - not be recognised. + description: |- + Part of the request was invalid. For example, the login type may not be recognised. + + Specific error codes used with this status code include: + * {{% added-in v="1.17" %}} `M_APPSERVICE_LOGIN_UNSUPPORTED`: an application service + used the `m.login.application_service` type, but the server doesn't support logging + in via the Legacy authentication API. content: application/json: schema: diff --git a/data/api/client-server/registration.yaml b/data/api/client-server/registration.yaml index 4872ca64..7a923f9e 100644 --- a/data/api/client-server/registration.yaml +++ b/data/api/client-server/registration.yaml @@ -215,6 +215,9 @@ paths: * `M_INVALID_USERNAME` : The desired user ID is not a valid user name. * `M_EXCLUSIVE` : The desired user ID is in the exclusive namespace claimed by an application service. + * {{% added-in v="1.17" %}} `M_APPSERVICE_LOGIN_UNSUPPORTED`: an application service + used the `m.login.application_service` type without setting `inhibit_login` to `true`, + but the server doesn't support logging in via the Legacy authentication API. These errors may be returned at any stage of the registration process, including after authentication if the requested user ID was registered