summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-04-23 18:20:17 +0100
committerDavid Baker <dave@matrix.org>2015-04-23 18:20:17 +0100
commit03eb4adc6ead31b69af6a87b8d05ae7e0e965fd0 (patch)
treefb526c5b36c5c30ba70410123411461fbfa273f5 /synapse/rest
parentRemove ultimately unused feature of saving params from the first call in the ... (diff)
downloadsynapse-03eb4adc6ead31b69af6a87b8d05ae7e0e965fd0.tar.xz
Dedicated error code for failed 3pid auth verification
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/account.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py
index e33607b799..4d199bbbb8 100644
--- a/synapse/rest/client/v2_alpha/account.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -126,7 +126,9 @@ class ThreepidRestServlet(RestServlet):
         threepid = yield self.identity_handler.threepid_from_creds(threePidCreds)
 
         if not threepid:
-            raise SynapseError(400, "Failed to auth 3pid")
+            raise SynapseError(
+                400, "Failed to auth 3pid", Codes.THREEPID_AUTH_FAILED
+            )
 
         for reqd in ['medium', 'address', 'validatedAt']:
             if reqd not in threepid: