Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error codes from MSC4178 #1944

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1944.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add error codes to requestToken endpoints (MSC4178).
3 changes: 3 additions & 0 deletions content/client-server-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ only read state (e.g.: `/sync`, get account data, etc).
The user is unable to reject an invite to join the server notices room.
See the [Server Notices](#server-notices) module for more information.

`M_THREEPID_MEDIUM_NOT_SUPPORTED`
The homeserver does not support adding a third party identifier of the given medium.

#### Rate limiting

Homeservers SHOULD implement rate limiting to reduce the risk of being
Expand Down
15 changes: 9 additions & 6 deletions data/api/client-server/administrative_contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,11 @@ paths:
"400":
description: |-
The third-party identifier is already in use on the homeserver, or
the request was invalid. The error code `M_SERVER_NOT_TRUSTED`
can be returned if the server does not trust/support the identity server
provided in the request.
the request was invalid. Error codes that can be returned are:
* `M_SERVER_NOT_TRUSTED`: The server does not trust/support the identity server
provided in the request.
* `M_THREEPID_MEDIUM_NOT_SUPPORTED`: The homeserver does not support adding email addresses.
* `M_INVALID_PARAM`: The email address given was not valid.
content:
application/json:
schema:
Expand Down Expand Up @@ -547,9 +549,10 @@ paths:
"400":
description: |-
The third-party identifier is already in use on the homeserver, or
the request was invalid. The error code `M_SERVER_NOT_TRUSTED`
can be returned if the server does not trust/support the identity server
provided in the request.
the request was invalid. Error codes that can be returned are:
* `M_SERVER_NOT_TRUSTED`: The server does not trust/support the identity server
* `M_THREEPID_MEDIUM_NOT_SUPPORTED`: The homeserver does not support adding phone numbers.
* `M_INVALID_PARAM`: The phone number given was not valid.
content:
application/json:
schema:
Expand Down