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

How to get confirmTempUser to throw an error? #75

Open
seanpmaxwell opened this issue Aug 19, 2017 · 0 comments
Open

How to get confirmTempUser to throw an error? #75

seanpmaxwell opened this issue Aug 19, 2017 · 0 comments

Comments

@seanpmaxwell
Copy link

For testing purposes I want to get

nev.confirmTempUser(req.params.URL, (err, user) => {
        
        if(err)
        {
            perror(err)
            res.status(404).json({ msg: 'confirm_temp_usr_failed' })
        }
        else if(user)
            res.render('index.html')
        else
            res.redirect('/bad-route')
    })

to throw an error. But if I do something like change the nev settings or turn off the internet, err is still null and it just returns the user as not found. How do I make the error not be null?

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

1 participant