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

Open
#1,426 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Client-Server
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.