Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkMembersCredits behaviour different to expected #22

Open
eliasmalik opened this issue Aug 17, 2017 · 1 comment
Open

checkMembersCredits behaviour different to expected #22

eliasmalik opened this issue Aug 17, 2017 · 1 comment

Comments

@eliasmalik
Copy link

The checkMembersCredits function has the opposite behaviour to what is assumed by its user in the login handler.

Specifically, if there is an error, checkMemberCredits will execute the callback with a single truthy argument (the Error object). In the login handler, the callback we pass in only assumes a single argument, which it checks for truthiness. If the argument is truthy, it assumes the email exists. But actually, the argument will be truthy if there has been an error (because all objects are truthy). This is not the behaviour that is expected.

This is related to #20 because it can be addressed by using error-first callbacks

@Sohadwd
Copy link
Contributor

Sohadwd commented Aug 17, 2017

This is the first version and we already solved it but not merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants