{"action":"created","issue":{"url":"https://api.github.com/repos/matrix-org/synapse/issues/318","labels_url":"https://api.github.com/repos/matrix-org/synapse/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/matrix-org/synapse/issues/318/comments","events_url":"https://api.github.com/repos/matrix-org/synapse/issues/318/events","html_url":"https://github.com/matrix-org/synapse/pull/318","id":112333263,"number":318,"title":"Don't 500 on /login when the email doesn't map to a valid user ID.","user":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"erikjohnston","id":8428120,"avatar_url":"https://avatars.githubusercontent.com/u/8428120?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-20T10:12:28Z","updated_at":"2015-10-20T10:22:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/318","html_url":"https://github.com/matrix-org/synapse/pull/318","diff_url":"https://github.com/matrix-org/synapse/pull/318.diff","patch_url":"https://github.com/matrix-org/synapse/pull/318.patch"},"body":"If you tried to login with an email address which was not recognised, Synapse would 500. This is now fixed to instead 401 with an \"Unrecognised address\" message.\r\n\r\nThis is related to:\r\nhttps://github.com/vector-im/vector-web/issues/220\r\n\r\nI'm not sure how we should best handle the codes/messages here. By exposing anything other than a 403 we are exposing that the email address is or is not registered on the target HS, but UX demands that people who try to login with an invalid email address should be told.\r\n\r\nFurther, should we be using a separate `M_UNKNOWN_ADDRESS` error code? At the moment, clients would need to either display the `error` directly or assume that a 401 when giving a `medium`/`address` means \"unknown address\"."},"comment":{"url":"https://api.github.com/repos/matrix-org/synapse/issues/comments/149512935","html_url":"https://github.com/matrix-org/synapse/pull/318#issuecomment-149512935","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/318","id":149512935,"user":{"login":"erikjohnston","id":8428120,"avatar_url":"https://avatars.githubusercontent.com/u/8428120?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T10:22:38Z","updated_at":"2015-10-20T10:22:38Z","body":"I would prefer if we keep 401 to mean \"You're not authorized, but if you relogin then it might work\""}}