Better structure for error response

& add server not trusted error
This commit is contained in:
David Baker 2016-06-30 16:22:01 +01:00
parent 3dddc0dcdf
commit e4db7be8e2
2 changed files with 12 additions and 6 deletions

View file

@ -177,12 +177,15 @@ paths:
type: object
400:
description: |-
The request was invalid. An errcode of ``M_THREEPID_IN_USE`` is used to inform the user
that the email address is already registered to an account on this server, however,
if the home server has the ability to send email, it is recommended that the server
instead send an email to the user with instructions on how to reset their password.
This prevents malicious parties from being able to determine if a given email address
has an account on the Home Server in question.
Part of the request was invalid. This may include one of the following error codes:
* ``M_THREEPID_IN_USE`` : The email address is already registered to an account on this server.
however, if the home server has the ability to send email, it is recommended that the server
instead send an email to the user with instructions on how to reset their password.
This prevents malicious parties from being able to determine if a given email address
has an account on the Home Server in question.
* ``M_SERVER_NOT_TRUSTED`` : The ``id_server`` parameter refers to an ID server
that is not trusted by this Home Server.
examples:
application/json: |-
{

View file

@ -116,6 +116,9 @@ Some requests have unique error codes:
:``M_THREEPID_IN_USE``:
Sent when a threepid given to an API cannot be used because the same threepid is already in use.
:``M_SERVER_NOT_TRUSTED``:
The client's request used a third party server, eg. ID server, that this server does not trust.
.. _sect:txn_ids:
The client-server API typically uses ``HTTP PUT`` to submit requests with a