matrix-org / matrix-org/matrix-spec
Spec asks homeservers to error on `/account/3pid/add` and in certain cases but does not specify an appropriate status code/errcode for the response
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
In the description of POST /_matrix/client/v3/account/3pid/add there is a line that states:
Homeservers should prevent the caller from adding a 3PID to their account if it has already been added to another user’s account on the homeserver.
However, only 200, 401 and 429 error codes are specified - none of which are appropriate for informing the client that the association has been rejected.
I propose we follow the example of POST /_matrix/client/v3/register/email/requestToken and specify that 400 / M_THREEPID_IN_USE be used in this case.
I believe that this is a good rule to have in the spec. Note that this would require an MSC, as I'm not aware of any homeserver implementations that even enforce this currently.
Related: https://github.com/matrix-org/matrix-spec/issues/520
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the documented POST /_matrix/client/v3/account/3pid/add and POST /_matrix/client/v3/register/email/requestToken sections, then read related issue #520. Determine the MSC needed to define the rejected-association response and its status code and errcode; the work is done when the proposal and resulting specification change are agreed and documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100