element-hq / element-hq/synapse

Synapse doesn't pass errors from the identity server through to clients when verifying a phone number

Open
#11,016 0 comments 0 reactions 0 assignees View on GitHub
S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#11016](https://github.com/matrix-org/synapse/issues/11016).

---

If an identity server responds to a request with an error, e.g. with a message saying a validation token is invalid etc, Synapse doesn't pass it through to clients. Instead, it responds with a generic "Error contacting the identity server" error (with the `M_UNKNOWN` code):

https://github.com/matrix-org/synapse/blob/a0f48ee89d88fd7b6da8023dbba607a69073152e/synapse/handlers/identity.py#L631-L633

This creates a confusing user experience because clients can't do much other than printing out that generic message, which doesn't make it clear where the issue comes from:

![image](https://user-images.githubusercontent.com/5547783/136356038-554abc26-2feb-414e-a149-38a6e6f37689.png)

Note that we correctly pass the error through when requesting a token for a phone number, so I don't think there should be an issue with doing the same here:

https://github.com/matrix-org/synapse/blob/a0f48ee89d88fd7b6da8023dbba607a69073152e/synapse/handlers/identity.py#L535-L537

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.