summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-10-21 09:42:07 +0100
committerKegan Dougal <kegan@matrix.org>2015-10-21 09:42:07 +0100
commitede07434e069d1b143993a3b492428b69a515856 (patch)
tree17ec6c5de520fb09290ec03574a9245159a00428
parentDon't 500 when the email doesn't map to a valid user ID. (diff)
downloadsynapse-ede07434e069d1b143993a3b492428b69a515856.tar.xz
Use 403 and message to match handlers/auth
-rw-r--r--synapse/rest/client/v1/login.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index b2e4cb8eaa..e71cf7e43e 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -102,9 +102,7 @@ class LoginRestServlet(ClientV1RestServlet):
                 login_submission['medium'], login_submission['address']
             )
             if not user_id:
-                raise LoginError(
-                    401, "Unrecognised address", errcode=Codes.UNAUTHORIZED
-                )
+                raise LoginError(403, "", errcode=Codes.FORBIDDEN)
         else:
             user_id = login_submission['user']