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

Error Handler is never raised and error log is not generated ! #16

Open
Villva-vinoth opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@Villva-vinoth
Copy link

Hi,
Error handler is middleware func but that does n't call if any error occurs
even the user is create and again with same user name we can't create other user so this case i have found out that the Error log file isnt generated !

May be
in the controller we need to pass
if (!username || !password) {
res.status(400)
throw new Error("All fields are required")
}

i have get the Error logs...

Thanks to davegray ! i really enjoyed lessons

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