summary refs log tree commit diff
path: root/synapse/rest/client/account.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-02-08 12:57:17 +0000
committerGitHub <noreply@github.com>2022-02-08 12:57:17 +0000
commited2f158a380e31429759521883de95ee5cbc25bb (patch)
tree5eddc8b1da11c198f928c15ad4a855fcc577a41c /synapse/rest/client/account.py
parentHotfixes: Revert `commit()` OpenTracing hackery (#11906) (diff)
downloadsynapse-ed2f158a380e31429759521883de95ee5cbc25bb.tar.xz
Printf debugging for MSISDN validation (#11882)
This makes some attempt to keep CI happy too, but it probably ought not to.
Diffstat (limited to 'synapse/rest/client/account.py')
-rw-r--r--synapse/rest/client/account.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/rest/client/account.py b/synapse/rest/client/account.py
index 6b272658fc..d9cb55e35b 100644
--- a/synapse/rest/client/account.py
+++ b/synapse/rest/client/account.py
@@ -467,6 +467,7 @@ class MsisdnThreepidRequestTokenRestServlet(RestServlet):
         next_link = body.get("next_link")  # Optional param
 
         msisdn = phone_number_to_msisdn(country, phone_number)
+        logger.info("Request #%s to verify ownership of %s", send_attempt, msisdn)
 
         if not check_3pid_allowed(self.hs, "msisdn", msisdn):
             raise SynapseError(
@@ -494,6 +495,7 @@ class MsisdnThreepidRequestTokenRestServlet(RestServlet):
                 await self.hs.get_clock().sleep(random.randint(1, 10) / 10)
                 return 200, {"sid": random_string(16)}
 
+            logger.info("MSISDN %s is already in use by %s", msisdn, existing_user_id)
             raise SynapseError(400, "MSISDN is already in use", Codes.THREEPID_IN_USE)
 
         if not self.hs.config.registration.account_threepid_delegate_msisdn:
@@ -518,6 +520,7 @@ class MsisdnThreepidRequestTokenRestServlet(RestServlet):
         threepid_send_requests.labels(type="msisdn", reason="add_threepid").observe(
             send_attempt
         )
+        logger.info("MSISDN %s: got response from identity server: %s", msisdn, ret)
 
         return 200, ret