Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
babolivier opened this issue Oct 7, 2021 · 0 comments
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@babolivier
Copy link
Contributor

babolivier commented Oct 7, 2021

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):

except HttpResponseException as e:
logger.warning("Error contacting msisdn account_threepid_delegate: %s", e)
raise SynapseError(400, "Error contacting the identity server")

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

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:

except HttpResponseException as e:
logger.info("Proxied requestToken failed: %r", e)
raise e.to_synapse_error()

@babolivier babolivier added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Oct 7, 2021
@babolivier babolivier changed the title Synapse doesn't pass errors from the identity server through to clients Synapse doesn't pass errors from the identity server through to clients when verifying a phone number Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

1 participant