diff --git a/app/api/facebook/func.js b/app/api/facebook/func.js index 4bb81b0..1b2b8e2 100644 --- a/app/api/facebook/func.js +++ b/app/api/facebook/func.js @@ -6,10 +6,7 @@ module.exports = async (context) => { const user = await app.models.users.findOne({ ra, 'oauth.emailFacebook': email }) if (!user) { - return { - error: user, - msg: 'User does not exist' - } + throw new Error('User does not exists') } return {