Skip to content

Commit

Permalink
better errors in case user is not finf
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Nov 17, 2023
1 parent e962e03 commit b141ef7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/api/facebook/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b141ef7

Please sign in to comment.