synapse
synapse copied to clipboard
When submitting a wrong token to validate a phone number the error is not correct
When adding a phone number to an account, the user receive a submit_url in the response, and also a text message on the phone with a token composed by 6 digits.
When submitting a wrong token with
curl -X POST --data $'{"client_secret":"8f4285f7-ace9-4645-b545-e55e0566ab07","sid":"821337013","token":"111111"}' \
-H "Authorization: Bearer MDAxOGxvY2F0aW9uIG1hdHJp_REDACTED" \
'https://matrix-client.matrix.org/_matrix/client/unstable/add_threepid/msisdn/submit_token'
The user receive an error 400 with the following body:
{
"errcode": "M_UNKNOWN",
"error": "Error contacting the identity server"
}
The errcode should be more specific for instance "M_INVALID_TOKEN" (see https://github.com/matrix-org/sydent/issues/292) and the error value is really confusing, because there is no identity server at all on the loop.
the
errorvalue is really confusing, because there is no identity server at all on the loop.
Just to give more context around this, there is an IS in the loop as Synapse delegates MSISDN validation to Sydent (as it doesn't know how to do it.
I think the next step is to change the Synapse code so that it forwards the error from the identity server.
I'm afraid we've got too much customer work going on at the moment to be able to prioritise this. Let us know if it's a big issue for you and we can reconsider
This is not a big issue, and Element Android understands the error response correctly, so there is no rush.
@babolivier from client POV there is no identity server on the loop :). Internal delegation should stay internal.
Yes, that makes sense, I was just giving more context to explain why the error message is currently like that :)