{"action":"created","issue":{"url":"https://api.github.com/repos/colinskow/superlogin/issues/93","repository_url":"https://api.github.com/repos/colinskow/superlogin","labels_url":"https://api.github.com/repos/colinskow/superlogin/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/colinskow/superlogin/issues/93/comments","events_url":"https://api.github.com/repos/colinskow/superlogin/issues/93/events","html_url":"https://github.com/colinskow/superlogin/issues/93","id":168499262,"number":93,"title":"the result of 'validate email' is using a hard coded message that replaces more specific messages","user":{"login":"jon123","id":3606143,"avatar_url":"https://avatars.githubusercontent.com/u/3606143?v=3","gravatar_id":"","url":"https://api.github.com/users/jon123","html_url":"https://github.com/jon123","followers_url":"https://api.github.com/users/jon123/followers","following_url":"https://api.github.com/users/jon123/following{/other_user}","gists_url":"https://api.github.com/users/jon123/gists{/gist_id}","starred_url":"https://api.github.com/users/jon123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jon123/subscriptions","organizations_url":"https://api.github.com/users/jon123/orgs","repos_url":"https://api.github.com/users/jon123/repos","events_url":"https://api.github.com/users/jon123/events{/privacy}","received_events_url":"https://api.github.com/users/jon123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-31T03:23:13Z","updated_at":"2016-08-01T07:25:53Z","closed_at":null,"body":"In route.js in the function\r\n\r\n`router.get('/validate-email/:email',`\r\n\r\nthe line\r\n\r\n`res.status(409).json({error: 'Email already in use'})`\r\n\r\nis hard coding the returned message and therefore discarding more meaningful error messages returned by the call to:\r\n\r\n`promise = user.validateEmail(req.params.email);`\r\n\r\nsuch as \r\n\r\n` return BPromise.resolve('invalid email');`\r\n\r\nI correct this by replacing\r\n\r\n`res.status(409).json({error: 'Email already in use'})` \r\n\r\nwith\r\n\r\n`res.status(409).json({error: err});`"},"comment":{"url":"https://api.github.com/repos/colinskow/superlogin/issues/comments/236507870","html_url":"https://github.com/colinskow/superlogin/issues/93#issuecomment-236507870","issue_url":"https://api.github.com/repos/colinskow/superlogin/issues/93","id":236507870,"user":{"login":"colinskow","id":5303269,"avatar_url":"https://avatars.githubusercontent.com/u/5303269?v=3","gravatar_id":"","url":"https://api.github.com/users/colinskow","html_url":"https://github.com/colinskow","followers_url":"https://api.github.com/users/colinskow/followers","following_url":"https://api.github.com/users/colinskow/following{/other_user}","gists_url":"https://api.github.com/users/colinskow/gists{/gist_id}","starred_url":"https://api.github.com/users/colinskow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinskow/subscriptions","organizations_url":"https://api.github.com/users/colinskow/orgs","repos_url":"https://api.github.com/users/colinskow/repos","events_url":"https://api.github.com/users/colinskow/events{/privacy}","received_events_url":"https://api.github.com/users/colinskow/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T07:25:53Z","updated_at":"2016-08-01T07:25:53Z","body":"OK, I agree with you and will fix this in the next release."}}
{"actor":{"display_login":"colinskow"}}